Skip to content

Commit 2c0ac4f

Browse files
Merge pull request #1632 from Syncfusion-Content/hotfix/hotfix-v28.1.33
DOCINFRA-2341_merged_using_automation
2 parents 46e8609 + de3efc1 commit 2c0ac4f

File tree

79 files changed

+229
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+229
-202
lines changed

wpf/Button/Getting-Started.md

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ The [IconTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.C
305305

306306
{% highlight XAML %}
307307

308-
<Window x:Class="TemplateSelector_ButtonAdv.MainWindow"
308+
<Window x:Class="TemplateSelector_ButtonAdv.MainWindow"
309309
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
310310
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
311311
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@@ -314,8 +314,13 @@ The [IconTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.C
314314
xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
315315
mc:Ignorable="d"
316316
Title="MainWindow" Height="450" Width="800">
317+
318+
<Window.DataContext>
319+
<local:ViewModel/>
320+
</Window.DataContext>
321+
317322
<Window.Resources>
318-
<DataTemplate x:Key="newIcon">
323+
<DataTemplate x:Key="checkedIcon">
319324
<Grid Width="12" Height="16">
320325
<Path
321326
Margin="0.5"
@@ -328,7 +333,7 @@ The [IconTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.C
328333
Stretch="Fill" />
329334
</Grid>
330335
</DataTemplate>
331-
<DataTemplate x:Key="OpenIcon">
336+
<DataTemplate x:Key="unCheckedIcon">
332337
<Grid Width="16" Height="16">
333338
<Path
334339
Margin="0.5,0.5,0.738,0.502"
@@ -341,12 +346,13 @@ The [IconTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.C
341346
Stretch="Fill" />
342347
</Grid>
343348
</DataTemplate>
344-
<local:TemplateSelector x:Key="IconTemp" NewIcon="{StaticResource newIcon}" OpenIcon="{StaticResource OpenIcon}"/>
349+
<local:IconTemplateSelector x:Key="IconTemplateSelector" CheckedIcon="{StaticResource checkedIcon}" UnCheckedIcon="{StaticResource unCheckedIcon}"/>
345350
</Window.Resources>
351+
346352
<Grid>
347353
<StackPanel VerticalAlignment="Center">
348-
<CheckBox Name="Check" IsChecked="True" Checked="Check_Checked" Unchecked="Check_Unchecked" HorizontalAlignment="Center" Command="{Binding CheckCommand}" Content="ChangeIcon"/>
349-
<syncfusion:ButtonAdv HorizontalAlignment="Center" Margin="10" Content="{Binding IsChecked}" Label="IconTemplateSelector" IconTemplateSelector="{StaticResource IconTemp}"/>
354+
<CheckBox Name="Check" IsChecked="{Binding IsChecked, Mode=TwoWay}" HorizontalAlignment="Center" Content="ChangeIcon"/>
355+
<syncfusion:ButtonAdv x:Name="button" HorizontalAlignment="Center" Margin="10" Label="IconTemplateSelector" IconTemplateSelector="{StaticResource IconTemplateSelector}" DataContext="{Binding IsChecked}"/>
350356
</StackPanel>
351357
</Grid>
352358
</Window>
@@ -355,28 +361,49 @@ The [IconTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.C
355361

356362
{% highlight c# %}
357363

358-
public class TemplateSelector : DataTemplateSelector
359-
{
360-
public DataTemplate NewIcon { get; set; }
361-
public DataTemplate OpenIcon { get; set; }
362-
public override DataTemplate SelectTemplate(object item, DependencyObject container)
364+
public class ViewModel : INotifyPropertyChanged
363365
{
364-
if (item == null)
365-
{
366-
return OpenIcon;
367-
}
368-
if ((item as Model).IsChecked)
369-
{
370-
return NewIcon;
371-
}
372-
return base.SelectTemplate(item, container);
366+
private bool _isChecked;
367+
public bool IsChecked
368+
{
369+
get { return _isChecked; }
370+
set
371+
{
372+
if (_isChecked != value)
373+
{
374+
_isChecked = value;
375+
OnPropertyChanged(nameof(IsChecked));
376+
}
377+
}
378+
}
379+
380+
public event PropertyChangedEventHandler PropertyChanged;
381+
382+
protected void OnPropertyChanged(string propertyName) =>
383+
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
384+
}
385+
386+
public class IconTemplateSelector : DataTemplateSelector
387+
{
388+
public DataTemplate CheckedIcon { get; set; }
389+
public DataTemplate UnCheckedIcon { get; set; }
390+
391+
public override DataTemplate SelectTemplate(object item, DependencyObject container)
392+
{
393+
if (item is bool isChecked)
394+
{
395+
return isChecked ? CheckedIcon : UnCheckedIcon;
396+
}
397+
return base.SelectTemplate(item, container);
398+
}
373399
}
374-
}
375400

376401
{% endhighlight %}
377402

378403
{% endtabs %}
379404

405+
![IconTemplateSelector in WPF Button](Getting-Started_images/Getting-Started_IconTemplateSelector.gif)
406+
380407
N> The [ButtonAdv](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.Controls.ButtonAdv.html) loads the icon in the following priority order.
381408
* [IconTemplateSelector](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.Controls.ButtonAdv.html#Syncfusion_Windows_Tools_Controls_ButtonAdv_IconTemplateSelector)
382409
* [IconTemplate](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Tools.Controls.ButtonAdv.html#Syncfusion_Windows_Tools_Controls_ButtonAdv_IconTemplate)
20.1 KB
Loading

wpf/Circular-ProgressBar/Appearance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: post
3-
title: Appearance in WPF circular progressbar control | Syncfusion
4-
description: Learn here all about Appearance support in Syncfusion WPF circular progressbar (SfCircularProgressBar) control and more.
3+
title: Appearance in WPF circular progressbar control | Syncfusion&reg;
4+
description: Learn here all about Appearance support in Syncfusion&reg; WPF circular progressbar (SfCircularProgressBar) control and more.
55
platform: wpf
66
control: SfCircularProgressBar
77
documentation: ug

wpf/Circular-ProgressBar/Custom-Content.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: Custom Content in WPF circular progressbar control | Syncfusion
4-
description: Learn here all about Custom Content support in Syncfusion WPF circular progressbar (SfCircularProgressBar) control and more.
5-
platform: WPF
3+
title: Custom Content in WPF circular progressbar control | Syncfusion&reg;
4+
description: Learn here all about Custom Content support in Syncfusion&reg; WPF circular progressbar (SfCircularProgressBar) control and more.
5+
platform: wpf
66
control: SfCircularProgressBar
77
documentation: ug
88
---

wpf/Circular-ProgressBar/Getting-Started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: Getting Started with WPF Circular ProgressBar control | Syncfusion
4-
description: Learn here about getting started with Syncfusion WPF Circular ProgressBar (SfCircularProgressBar) control, its elements and more details.
5-
platform: WPF
3+
title: Getting Started with WPF Circular ProgressBar | Syncfusion&reg;
4+
description: Learn here about getting started with Syncfusion&reg; WPF Circular ProgressBar (SfCircularProgressBar) control, its elements and more details.
5+
platform: wpf
66
control: SfCircularProgressBar
77
documentation: ug
88
---
@@ -31,7 +31,7 @@ To add control manually in XAML, follow the given steps:
3131

3232
1. Add the following required assembly references to the project:
3333
* Syncfusion.SfProgressBar.WPF
34-
2. Import Syncfusion WPF schema **http://schemas.syncfusion.com/wpf** the in XAML page.
34+
2. Import Syncfusion&reg; WPF schema **http://schemas.syncfusion.com/wpf** the in XAML page.
3535
3. Declare the SfCircularProgressBar control in the XAML page.
3636

3737
{% capture codesnippet1 %}

wpf/Circular-ProgressBar/Overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: About WPF Circular ProgressBar control | Syncfusion
4-
description: Learn here all about introduction of Syncfusion WPF Circular ProgressBar (SfCircularProgressBar) control, its elements and more details.
5-
platform: WPF
3+
title: About WPF Circular ProgressBar control | Syncfusion&reg;
4+
description: Learn here all about introduction of Syncfusion&reg; WPF Circular ProgressBar (SfCircularProgressBar) control, its elements and more details.
5+
platform: wpf
66
control: SfCircularProgressBar
77
documentation: ug
88
---

wpf/Circular-ProgressBar/Segment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: Segment in WPF circular progressbar control | Syncfusion
4-
description: Learn here all about Segment support in Syncfusion WPF circular progressbar (SfCircularProgressBar) control and more.
5-
platform: WPF
3+
title: Segment in WPF circular progressbar control | Syncfusion&reg;
4+
description: Learn here all about Segment support in Syncfusion&reg; WPF circular progressbar (SfCircularProgressBar) control and more.
5+
platform: wpf
66
control: SfCircularProgressBar
77
documentation: ug
88
---

wpf/Circular-ProgressBar/States.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: States in WPF circular progressbar control | Syncfusion
4-
description: Learn here all about States support in Syncfusion WPF circular progressbar (SfCircularProgressBar) control and more.
5-
platform: WPF
3+
title: States in WPF circular progressbar control | Syncfusion&reg;
4+
description: Learn here all about States support in Syncfusion&reg; WPF circular progressbar (SfCircularProgressBar) control and more.
5+
platform: wpf
66
control: SfCircularProgressBar
77
documentation: ug
88
---

wpf/Linear-ProgressBar/Appearance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: Appearance of the WPF Linear ProgressBar control | Syncfusion
4-
description: Learn here about appearance and look of the Syncfusion WPF Linear ProgressBar control and more details.
5-
platform: WPF
3+
title: Appearance of the WPF Linear ProgressBar control | Syncfusion&reg;
4+
description: Learn here about appearance and look of the Syncfusion&reg; WPF Linear ProgressBar control and more details.
5+
platform: wpf
66
control: SfLinearProgressBar
77
documentation: ug
88
---

wpf/Linear-ProgressBar/Getting-Started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
layout: post
3-
title: Getting started with WPF Linear ProgressBar control | Syncfusion
4-
description: Learn here about getting started with the Syncfusion WPF Linear ProgressBar control and more details.
5-
platform: WPF
3+
title: Getting started with WPF Linear ProgressBar control | Syncfusion&reg;
4+
description: Learn here about getting started with the Syncfusion&reg; WPF Linear ProgressBar control and more details.
5+
platform: wpf
66
control: SfLinearProgressBar
77
documentation: ug
88
---
@@ -31,7 +31,7 @@ To add control manually in XAML, follow the given steps:
3131

3232
1. Add the following required assembly reference to the project:
3333
* Syncfusion.SfProgressBar.WPF
34-
2. Import Syncfusion WPF schema **http://schemas.syncfusion.com/wpf** in the XAML page.
34+
2. Import Syncfusion&reg; WPF schema **http://schemas.syncfusion.com/wpf** in the XAML page.
3535
3. Declare the SfLinearProgressBar control in the XAML page.
3636

3737
{% capture codesnippet1 %}

0 commit comments

Comments
 (0)