Skip to content

Commit 7811dcc

Browse files
committed
Replaced manual calcite font glyphs with calcite staticresource glyphs
1 parent b05a78d commit 7811dcc

File tree

8 files changed

+55
-53
lines changed

8 files changed

+55
-53
lines changed

src/WinUI/ArcGIS.WinUI.Viewer/MainPage.xaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
xmlns:arcgisruntime="using:ArcGIS"
55
xmlns:models="using:ArcGIS.Samples.Shared.Models"
66
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
7-
xmlns:viewer="using:ArcGIS.WinUI.Viewer">
7+
xmlns:viewer="using:ArcGIS.WinUI.Viewer"
8+
xmlns:cal="using:Esri.Calcite.WinUI">
89
<Page.Resources>
910
<DataTemplate x:Key="StandardSampleItemTemplate">
1011
<Border Margin="1"
@@ -104,7 +105,7 @@
104105
Background="Transparent"
105106
BorderBrush="Transparent"
106107
Click="Settings_Click">
107-
<SymbolIcon RequestedTheme="Dark" Symbol="Setting" />
108+
<cal:SymbolIcon Symbol="Gear" IconScale="Medium" RequestedTheme="Dark" />
108109
</Button>
109110

110111
<Button Grid.Column="3"
@@ -116,9 +117,8 @@
116117
Background="Transparent"
117118
Click="Feedback_Click"
118119
BorderBrush="Transparent">
119-
<Path Data="M18 10H7V9h11v1zm0 2H7v1h11v-1zm-1 3H7v1h10v-1zm-4 3H7v1h6v-1zm8-15v10.19c-.23.21-.54.51-1 .97V4h-1V3h2zM5 22h7.73l-.41 1H4V3h2v1H5v18zm16-3.13V23h-4.14c.07-.05.06-.05 1.01-1H20v-2.13l1-1zM8.5 5.25v-3.5A.752.752 0 0 0 7.75 1a.752.752 0 0 0-.75.75v3.5c0 .412.338.75.75.75s.75-.338.75-.75zm3 0v-3.5a.752.752 0 0 0-.75-.75.752.752 0 0 0-.75.75v3.5c0 .412.338.75.75.75s.75-.338.75-.75zm3.5 0v-3.5a.752.752 0 0 0-.75-.75.752.752 0 0 0-.75.75v3.5c0 .412.338.75.75.75s.75-.338.75-.75zm3 0v-3.5a.752.752 0 0 0-.75-.75.752.752 0 0 0-.75.75v3.5c0 .412.338.75.75.75s.75-.338.75-.75zm3.435 11.772l-1.413-1.415-5.184 5.184 1.414 1.414 5.183-5.183zm1.725-2.05l-1.13-1.132a.2.2 0 0 0-.283 0l-.734.734 1.414 1.414.734-.734a.2.2 0 0 0 0-.283zm-9.32 6.941L13 24l2.086-.84-1.247-1.247z" Fill="White" />
120+
<cal:SymbolIcon Symbol="NotepadEdit" IconScale="Medium" RequestedTheme="Dark" />
120121
</Button>
121-
122122
</Grid>
123123

124124
<!--

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Data/CreateKmlMultiTrack/CreateKmlMultiTrack.xaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<UserControl.Resources>
77
<Style x:Key="IconStyle" TargetType="Button">
88
<Style.Setters>
9-
<Setter Property="FontFamily" Value="/Resources/Fonts/calcite-ui-icons-24.ttf#calcite-ui-icons-24" />
10-
<Setter Property="FontSize" Value="25" />
9+
<Setter Property="FontFamily" Value="{StaticResource CalciteUIIconsMediumFontFamily}" />
10+
<Setter Property="FontSize" Value="24" />
1111
<Setter Property="HorizontalAlignment" Value="Stretch" />
1212
<Setter Property="Margin" Value="5" />
1313
<Setter Property="CornerRadius" Value="5" />
@@ -29,7 +29,7 @@
2929
</Grid.ColumnDefinitions>
3030
<Button x:Name="RecenterButton"
3131
Click="RecenterButton_Click"
32-
Content="&#xe13c;"
32+
Content="{StaticResource CalciteUIIcons_Glyph_GpsOn}"
3333
IsEnabled="False"
3434
Style="{StaticResource IconStyle}"
3535
ToolTipService.ToolTip="Recenter" />
@@ -43,7 +43,7 @@
4343
<Button x:Name="SaveButton"
4444
Grid.Column="2"
4545
Click="SaveButton_Click"
46-
Content="&#xe262;"
46+
Content="{StaticResource CalciteUIIcons_Glyph_Save}"
4747
IsEnabled="False"
4848
Style="{StaticResource IconStyle}"
4949
ToolTipService.ToolTip="Save" />
@@ -66,7 +66,7 @@
6666
SelectionChanged="TracksComboBox_SelectionChanged" />
6767
<Button Grid.Column="1"
6868
Click="ResetButton_Click"
69-
Content="&#xe243;"
69+
Content="{StaticResource CalciteUIIcons_Glyph_Reset}"
7070
Style="{StaticResource IconStyle}"
7171
ToolTipService.ToolTip="Reset" />
7272
</Grid>

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Data/CreateKmlMultiTrack/CreateKmlMultiTrack.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private async Task LoadLocalKmlFile()
265265

266266
// Set the combo box's item source to the dictionary.
267267
// Make the first item in the combo box a `Show all KML tracks` option.
268-
TracksComboBox.ItemsSource = tracksDictionary.Prepend(new KeyValuePair<string, object>("Show all KLM tracks", allTracksGeometry)).ToList();
268+
TracksComboBox.ItemsSource = tracksDictionary.Prepend(new KeyValuePair<string, object>("Show all KML tracks", allTracksGeometry)).ToList();
269269

270270
// Set the viewpoint to the union geometry by invoking the selection changed event.
271271
TracksComboBox.SelectedIndex = 0;

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Geometry/CreateAndEditGeometries/CreateAndEditGeometries.xaml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<UserControl.Resources>
77
<Style x:Key="IconStyle" TargetType="Button">
88
<Style.Setters>
9-
<Setter Property="FontFamily" Value="/Resources/Fonts/calcite-ui-icons-24.ttf#calcite-ui-icons-24" />
10-
<Setter Property="FontSize" Value="25" />
9+
<Setter Property="FontFamily" Value="{StaticResource CalciteUIIconsMediumFontFamily}" />
10+
<Setter Property="FontSize" Value="24" />
1111
<Setter Property="Background" Value="White" />
1212
<Setter Property="HorizontalAlignment" Value="Stretch" />
1313
</Style.Setters>
@@ -32,32 +32,35 @@
3232
<RowDefinition Height="auto" />
3333
</Grid.RowDefinitions>
3434
<Grid.ColumnDefinitions>
35-
<ColumnDefinition Width="70" />
35+
<ColumnDefinition Width="75" />
3636
<ColumnDefinition Width="75" />
3737
</Grid.ColumnDefinitions>
3838
<Button x:Name="PointButton"
3939
Click="PointButton_Click"
40-
Content="&#xe21c;"
40+
Content="{StaticResource CalciteUIIcons_Glyph_Point}"
4141
Style="{StaticResource IconStyle}"
4242
ToolTipService.ToolTip="Point" />
4343
<Button x:Name="MultipointButton"
4444
Grid.Row="0"
4545
Grid.Column="1"
4646
Click="MultipointButton_Click"
47-
Content="&#xe21c;&#xe21c;"
47+
FontFamily="{StaticResource CalciteUIIconsSmallFontFamily}"
48+
FontSize="16"
49+
VerticalAlignment="Stretch"
50+
Content="&#xe9f9;&#xe9f9;"
4851
Style="{StaticResource IconStyle}"
4952
ToolTipService.ToolTip="Multipoint" />
5053
<Button x:Name="PolylineButton"
5154
Grid.Row="1"
5255
Click="PolylineButton_Click"
53-
Content="&#xe1a8;"
56+
Content="{StaticResource CalciteUIIcons_Glyph_Line}"
5457
Style="{StaticResource IconStyle}"
5558
ToolTipService.ToolTip="Polyline / no shape fill" />
5659
<Button x:Name="PolygonButton"
5760
Grid.Row="1"
5861
Grid.Column="2"
5962
Click="PolygonButton_Click"
60-
Content="&#xe220;"
63+
Content="{StaticResource CalciteUIIcons_Glyph_PolygonVertices}"
6164
Style="{StaticResource IconStyle}"
6265
ToolTipService.ToolTip="Polygon / shape fill" />
6366
<ComboBox x:Name="ToolComboBox"
@@ -78,42 +81,42 @@
7881
</Border>
7982
<Button Grid.Row="4"
8083
Click="UndoButton_Click"
81-
Content="&#xe2d6;"
84+
Content="{StaticResource CalciteUIIcons_Glyph_Undo}"
8285
IsEnabled="{Binding GeometryEditor.CanUndo, ElementName=MyMapView}"
8386
Style="{StaticResource IconStyle}"
8487
ToolTipService.ToolTip="Undo" />
8588
<Button Grid.Row="4"
8689
Grid.Column="2"
8790
Click="RedoButton_Click"
88-
Content="&#xe23e;"
91+
Content="{StaticResource CalciteUIIcons_Glyph_Redo}"
8992
IsEnabled="{Binding GeometryEditor.CanRedo, ElementName=MyMapView}"
9093
Style="{StaticResource IconStyle}"
9194
ToolTipService.ToolTip="Redo" />
9295
<Button Grid.Row="5"
9396
Click="DeleteSelectedButton_Click"
94-
Content="&#xe0e8;"
97+
Content="{StaticResource CalciteUIIcons_Glyph_Erase}"
9598
IsEnabled="{Binding GeometryEditor.SelectedElement.CanDelete, ElementName=MyMapView, FallbackValue=False}"
9699
Style="{StaticResource IconStyle}"
97100
ToolTipService.ToolTip="Delete selected" />
98101
<Button x:Name="SaveButton"
99102
Grid.Row="5"
100103
Grid.Column="1"
101104
Click="SaveButton_Click"
102-
Content="&#xe06f;"
105+
Content="{StaticResource CalciteUIIcons_Glyph_CheckCircle}"
103106
IsEnabled="{Binding GeometryEditor.CanUndo, ElementName=MyMapView}"
104107
Style="{StaticResource IconStyle}"
105108
ToolTipService.ToolTip="Save edits" />
106109
<Button Grid.Row="6"
107110
Click="DiscardButton_Click"
108-
Content="&#xe080;"
111+
Content="{StaticResource CalciteUIIcons_Glyph_CircleDisallowed}"
109112
IsEnabled="{Binding GeometryEditor.IsStarted, ElementName=MyMapView}"
110113
Style="{StaticResource IconStyle}"
111114
ToolTipService.ToolTip="Discard edits" />
112115
<Button x:Name="DeleteAllButton"
113116
Grid.Row="6"
114117
Grid.Column="1"
115118
Click="DeleteAllButton_Click"
116-
Content="&#xe2d0;"
119+
Content="{StaticResource CalciteUIIcons_Glyph_Trash}"
117120
IsEnabled="{Binding GeometryEditor.IsStarted, ElementName=MyMapView, Converter={StaticResource BoolNegationConverter}}"
118121
Style="{StaticResource IconStyle}"
119122
ToolTipService.ToolTip="Delete all geometries" />

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Geometry/EditGeometriesWithProgrammaticReticleTool/EditGeometriesWithProgrammaticReticleTool.xaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<UserControl.Resources>
88
<Style x:Key="IconStyle" TargetType="Button">
99
<Style.Setters>
10-
<Setter Property="FontFamily" Value="/Resources/Fonts/calcite-ui-icons-24.ttf#calcite-ui-icons-24" />
11-
<Setter Property="FontSize" Value="25" />
10+
<Setter Property="FontFamily" Value="{StaticResource CalciteUIIconsMediumFontFamily}" />
11+
<Setter Property="FontSize" Value="24" />
1212
<Setter Property="Margin" Value="3" />
1313
<Setter Property="Padding" Value="3" />
1414
<Setter Property="Background" Value="White" />
@@ -65,34 +65,34 @@
6565
<Button x:Name="UndoButton"
6666
Grid.Row="2"
6767
Click="UndoButton_Click"
68-
Content="&#xe2d6;"
68+
Content="{StaticResource CalciteUIIcons_Glyph_Undo}"
6969
IsEnabled="False"
7070
Style="{StaticResource IconStyle}"
7171
ToolTipService.ToolTip="Undo" />
7272
<Button Grid.Row="2"
7373
Grid.Column="1"
7474
Click="RedoButton_Click"
75-
Content="&#xe23e;"
75+
Content="{StaticResource CalciteUIIcons_Glyph_Redo}"
7676
IsEnabled="{Binding GeometryEditor.CanRedo, ElementName=MyMapView}"
7777
Style="{StaticResource IconStyle}"
7878
ToolTipService.ToolTip="Redo" />
7979
<Button Grid.Row="3"
8080
Click="DeleteSelectedButton_Click"
81-
Content="&#xe0e8;"
81+
Content="{StaticResource CalciteUIIcons_Glyph_Erase}"
8282
IsEnabled="{Binding GeometryEditor.SelectedElement.CanDelete, ElementName=MyMapView, FallbackValue=False}"
8383
Style="{StaticResource IconStyle}"
8484
ToolTipService.ToolTip="Delete selected" />
8585
<Button x:Name="SaveButton"
8686
Grid.Row="3"
8787
Grid.Column="1"
8888
Click="SaveButton_Click"
89-
Content="&#xe06f;"
89+
Content="{StaticResource CalciteUIIcons_Glyph_CheckCircle}"
9090
IsEnabled="{Binding GeometryEditor.CanUndo, ElementName=MyMapView}"
9191
Style="{StaticResource IconStyle}"
9292
ToolTipService.ToolTip="Save edits" />
9393
<Button Grid.Row="4"
9494
Click="DiscardButton_Click"
95-
Content="&#xe080;"
95+
Content="{StaticResource CalciteUIIcons_Glyph_CircleDisallowed}"
9696
IsEnabled="{Binding GeometryEditor.IsStarted, ElementName=MyMapView}"
9797
Style="{StaticResource IconStyle}"
9898
ToolTipService.ToolTip="Discard edits" />

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Geometry/SnapGeometryEdits/SnapGeometryEdits.xaml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
</DataTemplate>
2222
<Style x:Key="ButtonIconStyle" TargetType="Button">
2323
<Style.Setters>
24-
<Setter Property="FontFamily" Value="/Resources/Fonts/calcite-ui-icons-24.ttf#calcite-ui-icons-24" />
25-
<Setter Property="FontSize" Value="20" />
24+
<Setter Property="FontFamily" Value="{StaticResource CalciteUIIconsMediumFontFamily}" />
25+
<Setter Property="FontSize" Value="24" />
2626
<Setter Property="Background" Value="White" />
2727
<Setter Property="HorizontalAlignment" Value="Stretch" />
2828
</Style.Setters>
2929
</Style>
3030
<Style x:Key="ToggleButtonIconStyle" TargetType="ToggleButton">
3131
<Style.Setters>
32-
<Setter Property="FontFamily" Value="/Resources/Fonts/calcite-ui-icons-24.ttf#calcite-ui-icons-24" />
33-
<Setter Property="FontSize" Value="20" />
32+
<Setter Property="FontFamily" Value="{StaticResource CalciteUIIconsMediumFontFamily}" />
33+
<Setter Property="FontSize" Value="24" />
3434
<Setter Property="Background" Value="White" />
3535
<Setter Property="HorizontalAlignment" Value="Stretch" />
3636
</Style.Setters>
@@ -168,58 +168,60 @@
168168
Grid.Row="0"
169169
Grid.Column="0"
170170
Click="PointButton_Click"
171-
Content="&#xe21c;"
171+
Content="{StaticResource CalciteUIIcons_Glyph_Point}"
172172
Style="{StaticResource ToggleButtonIconStyle}"
173173
ToolTipService.ToolTip="Point" />
174174
<ToggleButton x:Name="MultipointButton"
175175
Grid.Row="0"
176176
Grid.Column="1"
177177
Height="{Binding ElementName=PointButton, Path=Height}"
178178
Click="MultipointButton_Click"
179-
Content="&#xe21c;&#xe21c;"
180-
FontSize="20"
179+
Content="&#xe9f9;&#xe9f9;"
180+
FontFamily="{StaticResource CalciteUIIconsSmallFontFamily}"
181+
FontSize="16"
182+
VerticalAlignment="Stretch"
181183
Style="{StaticResource ToggleButtonIconStyle}"
182184
ToolTipService.ToolTip="Multipoint" />
183185
<ToggleButton x:Name="PolylineButton"
184186
Grid.Row="1"
185187
Grid.Column="0"
186188
Click="PolylineButton_Click"
187-
Content="&#xe1a8;"
189+
Content="{StaticResource CalciteUIIcons_Glyph_Line}"
188190
Style="{StaticResource ToggleButtonIconStyle}"
189191
ToolTipService.ToolTip="Polyline / no shape fill" />
190192
<ToggleButton x:Name="PolygonButton"
191193
Grid.Row="1"
192194
Grid.Column="1"
193195
Click="PolygonButton_Click"
194-
Content="&#xe220;"
196+
Content="{StaticResource CalciteUIIcons_Glyph_PolygonVertices}"
195197
Style="{StaticResource ToggleButtonIconStyle}"
196198
ToolTipService.ToolTip="Polygon / shape fill" />
197199
<Button Grid.Row="2"
198200
Grid.Column="0"
199201
HorizontalAlignment="Stretch"
200202
Click="DeleteButton_Click"
201-
Content="&#xe0e8;"
203+
Content="{StaticResource CalciteUIIcons_Glyph_Erase}"
202204
IsEnabled="{Binding GeometryEditor.SelectedElement.CanDelete, ElementName=MyMapView, FallbackValue=False}"
203205
Style="{StaticResource ButtonIconStyle}"
204206
ToolTipService.ToolTip="Delete selected" />
205207
<Button Grid.Row="2"
206208
Grid.Column="1"
207209
Click="UndoButton_Click"
208-
Content="&#xe2d6;"
210+
Content="{StaticResource CalciteUIIcons_Glyph_Undo}"
209211
IsEnabled="{Binding GeometryEditor.CanUndo, ElementName=MyMapView}"
210212
Style="{StaticResource ButtonIconStyle}"
211213
ToolTipService.ToolTip="Undo" />
212214
<Button Grid.Row="3"
213215
Grid.Column="0"
214216
Click="DiscardButton_Click"
215-
Content="&#xe080;"
217+
Content="{StaticResource CalciteUIIcons_Glyph_CircleDisallowed}"
216218
IsEnabled="{Binding GeometryEditor.IsStarted, ElementName=MyMapView}"
217219
Style="{StaticResource ButtonIconStyle}"
218220
ToolTipService.ToolTip="Discard edits" />
219221
<Button Grid.Row="3"
220222
Grid.Column="1"
221223
Click="SaveButton_Click"
222-
Content="&#xe06f;"
224+
Content="{StaticResource CalciteUIIcons_Glyph_CheckCircle}"
223225
IsEnabled="{Binding GeometryEditor.CanUndo, ElementName=MyMapView}"
224226
Style="{StaticResource ButtonIconStyle}"
225227
ToolTipService.ToolTip="Save edits" />

0 commit comments

Comments
 (0)