Skip to content

Commit

Permalink
Merge pull request #724 from IgniteUI/fix/edits-to-get-wpf-compiling
Browse files Browse the repository at this point in the history
fixes for WPF compiling the handlers
  • Loading branch information
IGvaleries authored Oct 9, 2024
2 parents f2ed125 + 8a51a49 commit 79f00e7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 17 deletions.
1 change: 1 addition & 0 deletions code-gen-library/ChartStyleTest/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
public class ChartStyleTest
{
//begin eventHandler
//WPF: System.Action
public void ChartStyleTest()
{
//OMIT HANLDER
Expand Down
1 change: 1 addition & 0 deletions code-gen-library/GaugeAlignLabelWithOffset/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class GaugeAlignLabelWithOffset
{
//begin eventHandler
//WPF: Infragistics.Controls.Gauges.AlignLinearGraphLabelHandler
public void GaugeAlignLabelWithOffset(object sender, AlignLinearGraphLabelEventArgs args)
{
args.OffsetX += 15;
Expand Down
1 change: 1 addition & 0 deletions code-gen-library/GaugeAttachPrependFormatter/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
public class GaugeAttachPrependFormatter
{
//begin eventHandler
//WPF: Infragistics.Controls.Gauges.FormatLinearGraphLabelHandler
public void GaugeAttachPrependFormatter(object sender, FormatLinearGraphLabelEventArgs args)
{
args.Label = "$" + args.Label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class PropertyEditorInitAggregationsOnViewInit
{

//begin eventHandler
//WPF: System.Action
public void PropertyEditorInitAggregationsOnViewInit()
{
var editor = CodeGenHelper.GetDescription<XamPropertyEditorPanel>("editor");
Expand Down
39 changes: 22 additions & 17 deletions code-gen-library/SelectionMatcherOnViewInit/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,42 @@ public class SelectionMatcherOnViewInit
{
//begin eventHandler

private System.Threading.Timer _timer;
private DispatcherTimer _timer;

private void SelectionMatcherOnViewInit()
//WPF: System.Action
public void SelectionMatcherOnViewInit()
{
_timer = new System.Threading.Timer((_) =>
_timer = new DispatcherTimer();
_timer.Interval = TimeSpan.FromMilliseconds(100);
_timer.Tick += (o, e) =>
{
addSelection();
}, null, 100, 0);
AddSelection();
_timer.Stop();
};
_timer.Start();
}

private void addSelection()
private void AddSelection()
{
var chart = CodeGenHelper.GetDescription<XamCategoryChart>("content");

XamChartSelection selection = new XamChartSelection();
selection.Item = EnergyRenewableConsumption[1];
XamSeriesMatcher matcher = new XamSeriesMatcher();
ChartSelection selection = new ChartSelection();
selection.Item = ((IList)chart.ItemsSource)[1];
SeriesMatcher matcher = new SeriesMatcher();
matcher.MemberPath = "Solar";
matcher.MemberPathType = "ValueMemberPath";
selection.Matcher = matcher;

chart.SelectedSeriesItems.Add(selection);

selection = new XamChartSelection();
selection.Item = EnergyRenewableConsumption[1];
matcher = new XamSeriesMatcher();
selection = new ChartSelection();
selection.Item = ((IList)chart.ItemsSource)[1];
matcher = new SeriesMatcher();
matcher.MemberPath = "Hydro";
matcher.MemberPathType = "ValueMemberPath";

selection.Matcher = matcher;

chart.SelectedSeriesItems.Add(selection);
}
//end eventHandler
Expand Down
1 change: 1 addition & 0 deletions code-gen-library/ToolbarCustomIconOnInit/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class ToolbarCustomIconOnInit
{

//begin eventHandler
//WPF: System.Action
public void ToolbarCustomIconOnInit()
{
string Icon =
Expand Down
1 change: 1 addition & 0 deletions code-gen-library/ToolbarCustomIconOnViewInit/WPF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class ToolbarCustomIconOnViewInit
{

//begin eventHandler
//WPF: System.Action
public void ToolbarCustomIconOnViewInit()
{
var toolbar = CodeGenHelper.GetDescription<XamToolbar>("content");
Expand Down

0 comments on commit 79f00e7

Please sign in to comment.