-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from telerik/sdkUpdates
New version of Telerik SDK examples.
- Loading branch information
Showing
39 changed files
with
1,381 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Application x:Class="CustomRadComboBoxStyle.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:CustomRadComboBoxStyle" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/System.Windows.xaml"/> | ||
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/Telerik.Windows.Controls.xaml"/> | ||
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/Telerik.Windows.Controls.Input.xaml"/> | ||
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Black;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/> | ||
<ResourceDictionary Source="CustomStyles/Office_BlackCustomStyles.xaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System.Windows; | ||
|
||
namespace CustomRadComboBoxStyle | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
ToolBar/ToolBarCustomComboBoxStyle/Converters/GlobalThemeToColorConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Windows.Data; | ||
using System.Windows.Media; | ||
|
||
namespace CustomRadComboBoxStyle.Converters | ||
{ | ||
public class GlobalThemeToColorConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
var tokens = value.ToString().Split('_').ToArray(); | ||
|
||
if (tokens.Length <= 1) | ||
{ | ||
return Brushes.White; | ||
} | ||
|
||
var themeVariation = tokens[1]; | ||
|
||
if (themeVariation == "Dark") | ||
{ | ||
return Brushes.Black; | ||
} | ||
else if (themeVariation == "Gray") | ||
{ | ||
return Brushes.Gray; | ||
} | ||
else if (themeVariation == "LightGray") | ||
{ | ||
return Brushes.LightGray; | ||
} | ||
else if (themeVariation == "DarkGray") | ||
{ | ||
return Brushes.DarkGray; | ||
} | ||
else if (themeVariation == "Blue") | ||
{ | ||
return Brushes.MediumPurple; | ||
} | ||
else if (themeVariation == "HighContrast") | ||
{ | ||
return Brushes.Black; | ||
} | ||
|
||
return Brushes.White; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
ToolBar/ToolBarCustomComboBoxStyle/Converters/InvertedGlobalThemeToColorConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Windows.Data; | ||
using System.Windows.Media; | ||
|
||
namespace CustomRadComboBoxStyle.Converters | ||
{ | ||
public class InvertedGlobalThemeToColorConverter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
var tokens = value.ToString().Split('_').ToArray(); | ||
|
||
if (tokens.Length <= 1) | ||
{ | ||
return Brushes.Black; | ||
} | ||
|
||
var themeVariation = tokens[1]; | ||
|
||
if (themeVariation == "Dark" || themeVariation == "HighContrast") | ||
{ | ||
return Brushes.White; | ||
} | ||
|
||
return Brushes.Black; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
Oops, something went wrong.