Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Framework
Commits
27646a66
Commit
27646a66
authored
Jan 09, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加转化器
parent
ae58418e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
VIZ.Framework.Core/Core/Converter/Bool2BoolConverterSimple.cs
+33
-0
VIZ.Framework.Core/VIZ.Framework.Core.csproj
+1
-0
No files found.
VIZ.Framework.Core/Core/Converter/Bool2BoolConverterSimple.cs
0 → 100644
View file @
27646a66
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Data
;
using
System.Windows
;
namespace
VIZ.Framework.Core
{
/// <summary>
/// Bool --> Bool 简单转化器
/// </summary>
public
class
Bool2BoolConverterSimple
:
IValueConverter
{
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
if
(!(
value
is
bool
b
))
return
Binding
.
DoNothing
;
return
!
b
;
}
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
if
(!(
value
is
bool
b
))
return
Binding
.
DoNothing
;
return
!
b
;
}
}
}
VIZ.Framework.Core/VIZ.Framework.Core.csproj
View file @
27646a66
...
...
@@ -93,6 +93,7 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Core\Converter\Bool2BoolConverterSimple.cs" />
<Compile Include="Core\Converter\Bool2BoolConverter.cs" />
<Compile Include="Core\Converter\Bool2StringConverter.cs" />
<Compile Include="Core\Converter\ByteSizeConverter.cs" />
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment