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
22a4fb1a
Commit
22a4fb1a
authored
Mar 10, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加逻辑
parent
ea567a1c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
VIZ.Framework.Core/Core/Converter/ObjectNotNull2BoolConverter.cs
+36
-0
VIZ.Framework.Core/VIZ.Framework.Core.csproj
+1
-0
No files found.
VIZ.Framework.Core/Core/Converter/ObjectNotNull2BoolConverter.cs
0 → 100644
View file @
22a4fb1a
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Data
;
namespace
VIZ.Framework.Core
{
/// <summary>
/// 对象不为空转化器
/// </summary>
public
class
ObjectNotNull2BoolConverter
:
IValueConverter
{
/// <summary>
/// 为空时的返回值
/// </summary>
public
bool
NullResult
{
get
;
set
;
}
=
false
;
/// <summary>
/// 非空时的返回值
/// </summary>
public
bool
NotNullResult
{
get
;
set
;
}
=
true
;
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
return
value
==
null
?
this
.
NullResult
:
this
.
NotNullResult
;
}
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
throw
new
NotImplementedException
();
}
}
}
VIZ.Framework.Core/VIZ.Framework.Core.csproj
View file @
22a4fb1a
...
@@ -103,6 +103,7 @@
...
@@ -103,6 +103,7 @@
<Compile Include="Core\Converter\Bool2SolidColorBrushConverter.cs" />
<Compile Include="Core\Converter\Bool2SolidColorBrushConverter.cs" />
<Compile Include="Core\Converter\Color2SolidColorBrushConverter.cs" />
<Compile Include="Core\Converter\Color2SolidColorBrushConverter.cs" />
<Compile Include="Core\Converter\Enum2EnumDescriptionConverter.cs" />
<Compile Include="Core\Converter\Enum2EnumDescriptionConverter.cs" />
<Compile Include="Core\Converter\ObjectNotNull2BoolConverter.cs" />
<Compile Include="Core\Converter\String2ImageSourceConverter.cs" />
<Compile Include="Core\Converter\String2ImageSourceConverter.cs" />
<Compile Include="Core\Converter\StringAppendConverter.cs" />
<Compile Include="Core\Converter\StringAppendConverter.cs" />
<Compile Include="Core\Converter\NumberAddConverter.cs" />
<Compile Include="Core\Converter\NumberAddConverter.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