forked from MuthusamyPonraj/UWP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Performance.xaml
176 lines (163 loc) · 8.57 KB
/
Performance.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<View:SampleLayout
x:Class="DataGrid.Performance"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:View="using:Common"
xmlns:local="using:DataGrid"
xmlns:syncfusion="using:Syncfusion.UI.Xaml.Grid"
mc:Ignorable="d">
<View:SampleLayout.Resources>
<ResourceDictionary>
<local:StockChangeConverter x:Key="stockChangeConverter" />
<local:ChangeForegroundConverter x:Key="changeForegroundConverter" />
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="18" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontWeight" Value="Light" />
<Setter Property="Margin" Value="3,0" />
</Style>
</ResourceDictionary>
</View:SampleLayout.Resources>
<View:SampleLayout.Sample>
<UserControl>
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Margin="10" Orientation="Horizontal">
<StackPanel.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontSize" Value="16" />
<Setter Property="Margin" Value="5,0,10,5" />
<Setter Property="Foreground" Value="#FF333333" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="FontWeight" Value="Normal" />
</Style>
</StackPanel.Resources>
<TextBlock Margin="15,0,0,0" Text="Timer Frequency : " />
<TextBlock Margin="15,0,0,0"
FontWeight="SemiBold"
Foreground="#FF191717">
<Run Text="{Binding Value, ElementName=trackTimer}" />
<Run Text="ms" />
</TextBlock>
<TextBlock Margin="15,0,0,0" Text="No of Updates : " />
<TextBlock Margin="15,0,0,0"
FontWeight="SemiBold"
Foreground="#FF191717"
Text="10000" />
</StackPanel>
<syncfusion:SfDataGrid x:Name="datagrid"
Grid.Row="1"
Margin="10,13,10,15"
AllowSorting="False"
AutoGenerateColumns="False"
ColumnSizer="Star"
ItemsSource="{Binding Stocks}"
Loaded="OnSfDataGridLoaded"
NavigationMode="Row"
Unloaded="OnSfDataGridUnloaded">
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTextColumn MappingName="Symbol" />
<syncfusion:GridTextColumn Width="250" MappingName="Account" />
<syncfusion:GridTextColumn MappingName="LastTrade" HeaderText="Last Trade"/>
<syncfusion:GridTemplateColumn Width="200" MappingName="Change">
<syncfusion:GridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid Width="150">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock x:Name="changeValue"
Grid.Column="1"
HorizontalAlignment="Center"
FontSize="24"
FontWeight="Light"
Foreground="{Binding Change,
Converter={StaticResource changeForegroundConverter}}"
Text="{Binding Change}" />
<Path Width="18"
Height="18"
Margin="0,0,0,0"
Data="{Binding Change,
Converter={StaticResource stockChangeConverter}}"
Fill="{Binding Foreground,
ElementName=changeValue}"
Stretch="Uniform">
<Path.RenderTransform>
<TransformGroup>
<TransformGroup.Children>
<RotateTransform Angle="0" />
<ScaleTransform ScaleX="1" ScaleY="1" />
</TransformGroup.Children>
</TransformGroup>
</Path.RenderTransform>
</Path>
</Grid>
</DataTemplate>
</syncfusion:GridTemplateColumn.CellTemplate>
</syncfusion:GridTemplateColumn>
<syncfusion:GridTextColumn MappingName="PreviousClose" HeaderText="Previous Close" />
<syncfusion:GridTextColumn MappingName="Open" />
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
</Grid>
</UserControl>
</View:SampleLayout.Sample>
<View:SampleLayout.Setting>
<UserControl>
<StackPanel Margin="10,10,10,10">
<TextBlock Margin="0,5,0,0"
FontSize="14"
FontWeight="Bold"
Text="Timer and Update count :-"
Visibility="Collapsed" />
<StackPanel>
<TextBlock Margin="0,5,0,0"
FontSize="14"
FontWeight="Bold"
Text="Timer Frequency :-" />
<Slider x:Name="trackTimer"
Width="150"
Margin="0,5,0,0"
Maximum="1000"
Minimum="100"
TickFrequency="1"
TickPlacement="None"
Value="{Binding TimeSpanValue,
Mode=TwoWay}" />
<TextBlock Margin="0,5,0,0"
HorizontalAlignment="Left"
Text="No of updates :-"
Visibility="Collapsed" />
<ComboBox x:Name="NoOfUpdates"
Width="100"
Margin="0,5,0,0"
SelectedIndex="0"
SelectedItem="{Binding SelectedItem,
Mode=TwoWay}"
Visibility="Collapsed">
<ComboBoxItem Content="500" />
<ComboBoxItem Content="5000" />
<ComboBoxItem Content="50000" />
<ComboBoxItem Content="500000" />
</ComboBox>
</StackPanel>
<TextBlock Margin="0,5,0,0"
FontSize="14"
FontWeight="Bold"
Text="Start / Stop Timer :-" />
<Button x:Name="btnTimer"
Width="130"
Margin="0,5,0,0"
HorizontalAlignment="Center"
Command="{Binding BtonClick}"
Content="{Binding ButtonContnt}" />
</StackPanel>
</UserControl>
</View:SampleLayout.Setting>
</View:SampleLayout>