Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
livecharts
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
livecharts
Commits
f1b669ed
Commit
f1b669ed
authored
Jun 11, 2021
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 AxisSection.Remove 出错。 当从来没有Load事件时,根本就没执行 AxisSection.AsCoreElement, 也就没有 Model. 不需要Remove
parent
46f822fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
AxisSection.cs
WpfView/AxisSection.cs
+6
-0
No files found.
WpfView/AxisSection.cs
View file @
f1b669ed
...
@@ -391,6 +391,9 @@ namespace LiveCharts.Wpf
...
@@ -391,6 +391,9 @@ namespace LiveCharts.Wpf
/// </summary>
/// </summary>
public
void
Remove
()
public
void
Remove
()
{
{
if
(
Model
==
null
)
return
;
//没有进入Load事件,没有Model
Model
.
Chart
.
View
.
RemoveFromDrawMargin
(
_label
);
Model
.
Chart
.
View
.
RemoveFromDrawMargin
(
_label
);
Model
.
Chart
.
View
.
RemoveFromView
(
_label
);
Model
.
Chart
.
View
.
RemoveFromView
(
_label
);
Model
.
Chart
.
View
.
RemoveFromDrawMargin
(
_rectangle
);
Model
.
Chart
.
View
.
RemoveFromDrawMargin
(
_rectangle
);
...
@@ -405,7 +408,10 @@ namespace LiveCharts.Wpf
...
@@ -405,7 +408,10 @@ namespace LiveCharts.Wpf
/// <returns></returns>
/// <returns></returns>
public
AxisSectionCore
AsCoreElement
(
AxisCore
axis
,
AxisOrientation
source
)
public
AxisSectionCore
AsCoreElement
(
AxisCore
axis
,
AxisOrientation
source
)
{
{
//Load 事件,构建 Model
var
model
=
new
AxisSectionCore
(
this
,
axis
.
Chart
);
var
model
=
new
AxisSectionCore
(
this
,
axis
.
Chart
);
//model.View 就是 这个 this (AxisSection)
model
.
View
.
Model
=
model
;
model
.
View
.
Model
=
model
;
return
model
;
return
model
;
}
}
...
...
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