Just being new to WPF, I'm not sure "for the WPF application, which control or approach would be best for this requirement"
- I want to present an abstract table of information, but the user should decide to view the information based on" all time ", month, week or day.
- I want to show a viewfinder of the options that appear at the top of this part and it is visible as tab control.
- Although I'm not sure that although the best of tabcontrol
- Repeat the table for each tab object
- So what will be fully functional? There are only radio buttons on the top, but what do I want to see a tantantrol < / Li>
What's the best way to get TabControl view, but for a programming approach, for which I do not have to repeat things in every tab item
For example, I would use a TabControl and then a WPF template to include an equal to each tab item but with a different input parameter? (Previously WPF templates have not been used)
Thanks
Since you want If the behavior of the group of radio button
s and you want the visual appearance of TabItem
, then you should use the RadioButton
controls and style them like That they see such as TabItem
control here is a very simple example:
& lt; Window x: Class = "TabTest. Window 1" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/ Winfx / 2006 / Xaml "title =" window 1 "height =" 300 "width =" 300 "& gt; & Lt; Window.Resources & gt; & Lt; Style TargetType = "{x: type radio button}" & gt; & Lt; Setter Property = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "{x: type radio button}" & gt; & Lt; Border x: name = "tabborder" borderticiness = "1" borderbrush = "black" margin = "0,0, -4,0" cornerreadia = "2,12,0,0" background = "white" snaptvideo pixel = " Right "& gt; & Lt; ContentPresenter Margin = "12,2, 12,2" Vertical Element = "Center" Horizontal Alignment = "Left" Recognizes Access Access = "True" /> & Lt; / Border & gt; & Lt; ControlTemplate.Triggers & gt; & Lt; Trigger Property = "Ischic" value = "true" & gt; & Lt; Setter Property = "Panel.ZIndex" value = "100" /> & Lt; Setter target name = "tabborder" property = "background" value = "light blue" /> & Lt; Setter TargetName = "TabBorder" Property = "BorderTitches" Value = "1,1,1,0" /> & Lt; / Catalyst & gt; & Lt; /ControlTemplate.Triggers> & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt; & Lt; /Window.Resources> & Lt; Grid margin = "4" & gt; & Lt; Grid.RowDefinitions & gt; & Lt; RowDefinition Height = "Auto" /> & Lt; Roadfinion height = "*" /> & Lt; /Grid.RowDefinitions> & Lt; Stackpaneel grid Row = "0" orientation = "horizontal" margin = "0,0,0, -1" panel.jandex = "1" & gt; & Lt; Radio button & gt; All time & lt; / RadioButton & gt; & Lt; Radiobutton Ischiched = "True" & gt; Month & lt; / RadioButton & gt; & Lt; RadioButton & gt; Week & lt; / RadioButton & gt; & Lt; RadioButton & gt; Day & lt; / RadioButton & gt; & Lt; / StackPanel & gt; & Lt; Border grid Rows = "1" background = "light blue" border = "1" borderbrass = "black" snaptwoVideo pixel = "true" & gt; & Lt; Button margin = "10" grid. Rau = "1" & gt; This is a test & lt; / Button & gt; & Lt; / Border & gt; & Lt; / Grid & gt; & Lt; / Window & gt;
In this example, the button
is the place where you will keep your summary table.
Comments
Post a Comment