forked from xceedsoftware/wpftoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a64bb83
commit 0d9a63a
Showing
1,120 changed files
with
24,915 additions
and
8,433 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
27 changes: 27 additions & 0 deletions
27
...amples/Modules/Samples.Modules.Calculator/Converters/FormatStringToVisibilityConverter.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,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows.Data; | ||
using System.Globalization; | ||
using System.Windows; | ||
|
||
namespace Samples.Modules.Calculator.Converters | ||
{ | ||
class FormatStringToVisibilityConverter : IValueConverter | ||
{ | ||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) | ||
{ | ||
//When FormatString received is empty, make the Precision property Visible. | ||
//This is to prevent something like this: Precision = "5" AND FormatString = "C2". | ||
if( string.IsNullOrEmpty( ( string )value ) ) | ||
return Visibility.Visible; | ||
return Visibility.Hidden; | ||
} | ||
|
||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
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
27 changes: 27 additions & 0 deletions
27
...Solution/Src/Samples/Modules/Samples.Modules.ChildWindow/Converters/IntToBoolConverter.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,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows.Data; | ||
using System.Globalization; | ||
|
||
namespace Samples.Modules.ChildWindow.Converters | ||
{ | ||
class IntToBoolConverter : IValueConverter | ||
{ | ||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) | ||
{ | ||
int intReceived = (int)value; | ||
|
||
if( intReceived == 1 ) | ||
return false; | ||
else | ||
return true; | ||
} | ||
|
||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.