Skip to content

Commit

Permalink
v21.1.35
Browse files Browse the repository at this point in the history
  • Loading branch information
SyncfusionBuild committed Mar 24, 2023
1 parent 6704c9f commit f61bffb
Show file tree
Hide file tree
Showing 1,564 changed files with 322,624 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ Syncfusion has no liability for any damage or consequence that may arise by the

* To renew the subscription, click [here](https://www.syncfusion.com/sales/products?utm_source=github&utm_medium=listing) or contact our sales team at <salessupport@syncfusion.com>.

<p>Copyright © 2001-2023 Syncfusion, Inc. Updated on 2023-02-02 at precisely 05:48:03 EST.</p>
<p>Copyright © 2001-2023 Syncfusion, Inc. Updated on 2023-03-24 at precisely 10:20:07 EST.</p>
Binary file added common/Assets/Advantage_Runner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/App.ico
Binary file not shown.
Binary file added common/Assets/Aquil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Axis_XT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions common/Assets/Config/OLAPSample.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<SampleSource>
<Source>SyncfusionOfflineCube</Source>
<Version>SQL2005</Version>
<FilePath />
<ServerName />
<DatabaseName />
</SampleSource>
Binary file added common/Assets/FieldEffect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/8x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Aquaracer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Carrera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Envy_X2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Fastrack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/G-Shock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Iphone5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Lumia_800.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Lumia_920.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/MacBook_Pro2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Macbook_Air.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Men_Black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Monaco.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/One_X.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Pavilion_G6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/S3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Sea_Dweller Deepsea.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Submariner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Transformer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/Vaio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/XPS12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added common/Assets/Gadgets/XPS15.png
Binary file added common/Assets/Gadgets/Xperia_Tipo.png
Binary file added common/Assets/Gadgets/Xperia_Z.png
Binary file added common/Assets/Gadgets/Yoga.png
Binary file added common/Assets/GalleryViewImages/3D-Charts.png
Binary file added common/Assets/GalleryViewImages/Accordion.png
Binary file added common/Assets/GalleryViewImages/Auto Complete.png
Binary file added common/Assets/GalleryViewImages/Badge.png
Binary file added common/Assets/GalleryViewImages/Barcode.png
Binary file added common/Assets/GalleryViewImages/Bullet Graph.png
Binary file added common/Assets/GalleryViewImages/Buttons.png
Binary file added common/Assets/GalleryViewImages/Calculate.png
Binary file added common/Assets/GalleryViewImages/Calculator.png
Binary file added common/Assets/GalleryViewImages/Calendar.png
Binary file added common/Assets/GalleryViewImages/Card View.png
Binary file added common/Assets/GalleryViewImages/Carousel.png
Binary file added common/Assets/GalleryViewImages/Charts.png
Binary file added common/Assets/GalleryViewImages/CheckListBox.png
Binary file added common/Assets/GalleryViewImages/Color Picker.png
Binary file added common/Assets/GalleryViewImages/ComboBox.png
Binary file added common/Assets/GalleryViewImages/DataGrid.png
Binary file added common/Assets/GalleryViewImages/Date Picker.png
Binary file added common/Assets/GalleryViewImages/DateTimeEdit.png
Binary file added common/Assets/GalleryViewImages/Diagram.png
Binary file added common/Assets/GalleryViewImages/DocIO.png
Binary file added common/Assets/GalleryViewImages/Editors.png
Binary file added common/Assets/GalleryViewImages/Gantt.png
Binary file added common/Assets/GalleryViewImages/Gauge.png
Binary file added common/Assets/GalleryViewImages/Grid Splitter.png
Binary file added common/Assets/GalleryViewImages/GridControl.png
Binary file added common/Assets/GalleryViewImages/Group Bar.png
Binary file added common/Assets/GalleryViewImages/Heat Map.png
Binary file added common/Assets/GalleryViewImages/Hub Tile.png
Binary file added common/Assets/GalleryViewImages/Image Editor.png
Binary file added common/Assets/GalleryViewImages/Kanban.png
Binary file added common/Assets/GalleryViewImages/Map.png
Binary file added common/Assets/GalleryViewImages/Menu.png
Binary file added common/Assets/GalleryViewImages/Olap Client.png
Binary file added common/Assets/GalleryViewImages/Olap Gauge.png
Binary file added common/Assets/GalleryViewImages/Olap Grid.png
Binary file added common/Assets/GalleryViewImages/PDF Viewer.png
Binary file added common/Assets/GalleryViewImages/PDF.png
Binary file added common/Assets/GalleryViewImages/PivotGrid.png
Binary file added common/Assets/GalleryViewImages/Presentation.png
Binary file added common/Assets/GalleryViewImages/Progressbar.png
Binary file added common/Assets/GalleryViewImages/PropertyGrid.png
Binary file added common/Assets/GalleryViewImages/Radial Menu.png
Binary file added common/Assets/GalleryViewImages/Radial Slider.png
Binary file added common/Assets/GalleryViewImages/Range Slider.png
Binary file added common/Assets/GalleryViewImages/Rating.png
Binary file added common/Assets/GalleryViewImages/Ribbon.png
Binary file added common/Assets/GalleryViewImages/RichTextBox.png
Binary file added common/Assets/GalleryViewImages/Scheduler.png
Binary file added common/Assets/GalleryViewImages/Smith Chart.png
Binary file added common/Assets/GalleryViewImages/Sparkline.png
Binary file added common/Assets/GalleryViewImages/Spreadsheet.png
Binary file added common/Assets/GalleryViewImages/Surface Chart.png
Binary file added common/Assets/GalleryViewImages/Syntax Editor.png
Binary file added common/Assets/GalleryViewImages/TabControl.png
Binary file added common/Assets/GalleryViewImages/Task Bar.png
Binary file added common/Assets/GalleryViewImages/Tile View.png
Binary file added common/Assets/GalleryViewImages/Time Picker.png
Binary file added common/Assets/GalleryViewImages/TimeSpan Edit.png
Binary file added common/Assets/GalleryViewImages/Tool Bar.png
Binary file added common/Assets/GalleryViewImages/TreeGrid.png
Binary file added common/Assets/GalleryViewImages/TreeView.png
Binary file added common/Assets/GalleryViewImages/Treemap.png
Binary file added common/Assets/GalleryViewImages/XlsIO.png
Binary file added common/Assets/Movie/movie.png
Binary file added common/Assets/Northwind.sdf
Binary file not shown.
240 changes: 240 additions & 0 deletions common/Assets/Olap/Data/CubeModelTemplates/ReportDefenitionFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfOlapReport>
<OlapReport>
<CategoricalElements>
<List>
<Item>
<ElementValue d6p1:type="MeasureElements" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Elements>
<MeasureElement>
<Name>Internet Sales Amount</Name>
<UniqueName>[MEASURES].[Internet Sales Amount]</UniqueName>
</MeasureElement>
</Elements>
</ElementValue>
</Item>
<Item>
<ElementValue d6p1:type="DimensionElement" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Name>Customer</Name>
<Hierarchy>
<Name>Customer Geography</Name>
<LevelElements>
<LevelElement>
<Name>Country</Name>
<MemberElements />
<IncludeAvailableMembers>false</IncludeAvailableMembers>
</LevelElement>
</LevelElements>
</Hierarchy>
<HierarchyName>Customer Geography</HierarchyName>
</ElementValue>
</Item>
</List>
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</CategoricalElements>
<EngineVersion>Version3</EngineVersion>
<ChartSettings>
<AreaBackground />
<BorderColor>#000000</BorderColor>
<DataPointValue>false</DataPointValue>
<ChartBackground>#FFFFFF</ChartBackground>
<ChartColorPalette>Default</ChartColorPalette>
<ChartDockLegendPosition>Top</ChartDockLegendPosition>
<ChartType>Column</ChartType>
<GradientAngle>0</GradientAngle>
<InteriorBackground>#FFFFFF</InteriorBackground>
<IsCircleSymbol>false</IsCircleSymbol>
<IsLabelTemplate1>false</IsLabelTemplate1>
<IsLabelTemplate2>false</IsLabelTemplate2>
<IsLabelTemplate3>false</IsLabelTemplate3>
<IsRectangleSymbol>false</IsRectangleSymbol>
<IsSeriesName>false</IsSeriesName>
<IsTriangleSymbol>false</IsTriangleSymbol>
<IsXValues>false</IsXValues>
<IsYValues>false</IsYValues>
<LabelsVisibility>false</LabelsVisibility>
<LegendCheckBoxVisibility>false</LegendCheckBoxVisibility>
<LegendVisibility>true</LegendVisibility>
<ExpanderVisibility>false</ExpanderVisibility>
<StrokeThickness>0</StrokeThickness>
<SymbolsVisibility>false</SymbolsVisibility>
<TemplateVisibility>false</TemplateVisibility>
<XAxisFontFace>Segoe UI</XAxisFontFace>
<XAxisForeGround>#1E90FF</XAxisForeGround>
<XLabelFontWeight>Normal</XLabelFontWeight>
<YAxisFontFace>Segoe UI</YAxisFontFace>
<YAxisForeGround>#1E90FF</YAxisForeGround>
<YLabelFontWeight>Normal</YLabelFontWeight>
</ChartSettings>
<CurrentCubeName>Adventure Works</CurrentCubeName>
<FilterElements>
<List />
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</FilterElements>
<Name>Basic Template</Name>
<SeriesElements>
<List>
<Item>
<Axis>Series</Axis>
<ElementValue d6p1:type="DimensionElement" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Name>Date</Name>
<Hierarchy>
<Name>Fiscal</Name>
<LevelElements>
<LevelElement>
<Name>Fiscal Year</Name>
<MemberElements />
<IncludeAvailableMembers>false</IncludeAvailableMembers>
</LevelElement>
</LevelElements>
</Hierarchy>
<HierarchyName>Fiscal</HierarchyName>
</ElementValue>
</Item>
</List>
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</SeriesElements>
<ShowEmptyColumnData>false</ShowEmptyColumnData>
<ShowEmptyRowData>false</ShowEmptyRowData>
<ShowExpanders>true</ShowExpanders>
<SlicerElements>
<List />
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</SlicerElements>
<TogglePivot>false</TogglePivot>
</OlapReport>
<OlapReport>
<CategoricalElements>
<List>
<Item>
<ElementValue d6p1:type="MeasureElements" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Elements>
<MeasureElement>
<Name>Internet Sales Amount</Name>
<UniqueName>[MEASURES].[Internet Sales Amount]</UniqueName>
</MeasureElement>
</Elements>
</ElementValue>
</Item>
<Item>
<ElementValue d6p1:type="DimensionElement" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Name>Customer</Name>
<Hierarchy>
<Name>Customer Geography</Name>
<LevelElements>
<LevelElement>
<Name>Country</Name>
<MemberElements />
<IncludeAvailableMembers>false</IncludeAvailableMembers>
</LevelElement>
</LevelElements>
</Hierarchy>
<HierarchyName>Customer Geography</HierarchyName>
</ElementValue>
</Item>
</List>
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</CategoricalElements>
<EngineVersion>Version3</EngineVersion>
<ChartSettings>
<AreaBackground />
<BorderColor>#000000</BorderColor>
<DataPointValue>false</DataPointValue>
<ChartBackground>#FFFFFF</ChartBackground>
<ChartColorPalette>Default</ChartColorPalette>
<ChartDockLegendPosition>Top</ChartDockLegendPosition>
<ChartType>Column</ChartType>
<GradientAngle>0</GradientAngle>
<InteriorBackground>#FFFFFF</InteriorBackground>
<IsCircleSymbol>false</IsCircleSymbol>
<IsLabelTemplate1>false</IsLabelTemplate1>
<IsLabelTemplate2>false</IsLabelTemplate2>
<IsLabelTemplate3>false</IsLabelTemplate3>
<IsRectangleSymbol>false</IsRectangleSymbol>
<IsSeriesName>false</IsSeriesName>
<IsTriangleSymbol>false</IsTriangleSymbol>
<IsXValues>false</IsXValues>
<IsYValues>false</IsYValues>
<LabelsVisibility>false</LabelsVisibility>
<LegendCheckBoxVisibility>false</LegendCheckBoxVisibility>
<LegendVisibility>true</LegendVisibility>
<ExpanderVisibility>false</ExpanderVisibility>
<StrokeThickness>0</StrokeThickness>
<SymbolsVisibility>false</SymbolsVisibility>
<TemplateVisibility>false</TemplateVisibility>
<XAxisFontFace>Segoe UI</XAxisFontFace>
<XAxisForeGround>#1E90FF</XAxisForeGround>
<XLabelFontWeight>Normal</XLabelFontWeight>
<YAxisFontFace>Segoe UI</YAxisFontFace>
<YAxisForeGround>#1E90FF</YAxisForeGround>
<YLabelFontWeight>Normal</YLabelFontWeight>
</ChartSettings>
<CurrentCubeName>Adventure Works</CurrentCubeName>
<FilterElements>
<List />
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</FilterElements>
<Name>Filtered Dimension</Name>
<SeriesElements>
<List>
<Item>
<Axis>Series</Axis>
<ElementValue d6p1:type="DimensionElement" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Name>Date</Name>
<Hierarchy>
<Name>Fiscal</Name>
<LevelElements>
<LevelElement>
<Name>Fiscal Year</Name>
<MemberElements />
<IncludeAvailableMembers>false</IncludeAvailableMembers>
</LevelElement>
</LevelElements>
</Hierarchy>
<HierarchyName>Fiscal</HierarchyName>
</ElementValue>
<ExcludedElementValue d6p1:type="DimensionElement" xmlns:d6p1="http://www.w3.org/2001/XMLSchema-instance">
<Name>Date</Name>
<Hierarchy>
<Name>Fiscal</Name>
<LevelElements>
<LevelElement>
<Name>Fiscal Year</Name>
<MemberElements>
<MemberElement>
<Name>FY 2004</Name>
<ChildMemberElements />
<DimensionName />
<Level>0</Level>
<IsParentLevel>true</IsParentLevel>
<UniqueName>[Date].[Fiscal].[Fiscal Year].[FY 2004]</UniqueName>
</MemberElement>
<MemberElement>
<Name>FY 2005</Name>
<ChildMemberElements />
<DimensionName />
<Level>0</Level>
<IsParentLevel>true</IsParentLevel>
<UniqueName>[Date].[Fiscal].[Fiscal Year].[FY 2005]</UniqueName>
</MemberElement>
</MemberElements>
<IncludeAvailableMembers>true</IncludeAvailableMembers>
</LevelElement>
</LevelElements>
</Hierarchy>
<HierarchyName>Fiscal</HierarchyName>
</ExcludedElementValue>
</Item>
</List>
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</SeriesElements>
<ShowEmptyColumnData>false</ShowEmptyColumnData>
<ShowEmptyRowData>false</ShowEmptyRowData>
<ShowExpanders>true</ShowExpanders>
<SlicerElements>
<List />
<IsFilterOrSortOn>false</IsFilterOrSortOn>
</SlicerElements>
<TogglePivot>false</TogglePivot>
</OlapReport>
</ArrayOfOlapReport>
Binary file not shown.
Binary file not shown.
Binary file added common/Assets/Olap/Data/OfflineCube/Sales DB.cub
Binary file not shown.
Binary file added common/Assets/Olap/Data/Sales DB.xls
Binary file not shown.
Binary file added common/Assets/People/People_Circle0.png
Binary file added common/Assets/People/People_Circle1.png
Binary file added common/Assets/People/People_Circle10.png
Binary file added common/Assets/People/People_Circle11.png
Binary file added common/Assets/People/People_Circle12.png
Binary file added common/Assets/People/People_Circle13.png
Binary file added common/Assets/People/People_Circle14.png
Binary file added common/Assets/People/People_Circle15.png
Binary file added common/Assets/People/People_Circle16.png
Binary file added common/Assets/People/People_Circle17.png
Binary file added common/Assets/People/People_Circle18.png
Binary file added common/Assets/People/People_Circle19.png
Binary file added common/Assets/People/People_Circle2.png
Binary file added common/Assets/People/People_Circle20.png
Binary file added common/Assets/People/People_Circle21.png
Binary file added common/Assets/People/People_Circle22.png
Binary file added common/Assets/People/People_Circle23.png
Binary file added common/Assets/People/People_Circle24.png
Binary file added common/Assets/People/People_Circle25.png
Binary file added common/Assets/People/People_Circle26.png
Binary file added common/Assets/People/People_Circle27.png
Binary file added common/Assets/People/People_Circle28.png
Binary file added common/Assets/People/People_Circle29.png
Binary file added common/Assets/People/People_Circle3.png
Binary file added common/Assets/People/People_Circle31.png
Binary file added common/Assets/People/People_Circle32.png
Binary file added common/Assets/People/People_Circle33.png
Binary file added common/Assets/People/People_Circle34.png
Binary file added common/Assets/People/People_Circle35.png
Binary file added common/Assets/People/People_Circle36.png
Binary file added common/Assets/People/People_Circle37.png
Binary file added common/Assets/People/People_Circle4.png
Binary file added common/Assets/People/People_Circle5.png
Binary file added common/Assets/People/People_Circle6.png
Binary file added common/Assets/People/People_Circle7.png
Binary file added common/Assets/People/People_Circle8.png
Binary file added common/Assets/People/People_Circle9.png
Binary file added common/Assets/Population.jpg
Binary file added common/Assets/ProductCategoryImages/Calendar.png
Binary file added common/Assets/ProductCategoryImages/Charts.png
Binary file added common/Assets/ProductCategoryImages/Grids.png
Binary file added common/Assets/ProductCategoryImages/Layout.png
Binary file added common/Assets/ProductCategoryImages/MenusandBars.png
Binary file added common/Assets/ProductCategoryImages/Navigation.png
Binary file added common/Assets/RunCruise.png
Binary file added common/Assets/ToolBarIcons/AlignTextCenter.png
Binary file added common/Assets/ToolBarIcons/AlignTextLeft.png
Binary file added common/Assets/ToolBarIcons/AlignTextRight.png
Binary file added common/Assets/ToolBarIcons/Bold.png
Binary file added common/Assets/ToolBarIcons/Italic.png
Binary file added common/Assets/ToolBarIcons/Label.png
Binary file added common/Assets/ToolBarIcons/Properties.png
Binary file added common/Assets/error.png
Binary file added common/Assets/no.png
Binary file added common/Assets/yes.png
106 changes: 106 additions & 0 deletions common/Behaviors/LaunchDemoAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#region Copyright Syncfusion Inc. 2001-2023.
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using Microsoft.Xaml.Behaviors;
using Syncfusion.SfSkinManager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace syncfusion.demoscommon.wpf
{
public static class DemoLaucherExtension
{
public static T LauchDemo<T>(DemoBrowserViewModel viewmodel, DemoInfo demoInfo) where T : DependencyObject
{
T demo;
var constructorInfo = demoInfo.DemoViewType.GetConstructors().FirstOrDefault(cinfo => cinfo.IsPublic && cinfo.GetParameters().Length == 1 && cinfo.GetParameters()[0].Name == "themename");
if (demoInfo.ThemeMode != ThemeMode.None && constructorInfo != null)
{
demo = Activator.CreateInstance(demoInfo.DemoViewType,
demoInfo.ThemeMode == ThemeMode.Inherit ? viewmodel.SelectedThemeName : DemoBrowserViewModel.DefaultThemeName) as T;
}
else
{
demo = Activator.CreateInstance(demoInfo.DemoViewType) as T;
if (demoInfo.ThemeMode == ThemeMode.Inherit)
{
SfSkinManager.SetTheme(demo, new Theme() { ThemeName = viewmodel.SelectedThemeName });
}
else if (demoInfo.ThemeMode == ThemeMode.Default)
{
SfSkinManager.SetTheme(demo, new Theme() { ThemeName = DemoBrowserViewModel.DefaultThemeName });
}
}
return demo;
}
}

public class LaunchDemoAction : TriggerAction<Button>
{
protected override void Invoke(object parameter)
{
if (this.AssociatedObject == null)
return;

var viewmodel = this.AssociatedObject.DataContext as DemoBrowserViewModel;
if (viewmodel == null)
return;

if ((viewmodel.SelectedProduct != null && viewmodel.SelectedProduct.DemoLauchMode == DemoLauchMode.Window)
|| (viewmodel.SelectedSample != null && viewmodel.SelectedSample.DemoLauchMode == DemoLauchMode.Window))
{
try
{
if (viewmodel.SelectedSample.ShowBusyIndicator)
{
viewmodel.IsProductDemoBusy = true;
}
var window = DemoLaucherExtension.LauchDemo<Window>(viewmodel, viewmodel.SelectedSample);
DemosNavigationService.MainWindow.Dispatcher.BeginInvoke(new Action(() =>
{
viewmodel.IsProductDemoBusy = false;
}),
System.Windows.Threading.DispatcherPriority.ApplicationIdle);

if (window != null)
{
window.Title = viewmodel.SelectedSample.Title;
window.Owner = DemosNavigationService.MainWindow;
window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
window.Closed += Window_Closed;
window.ShowDialog();
}
}
catch (Exception exception)
{
viewmodel.IsProductDemoBusy = false;
ErrorWindow.Show(exception.Message + "\n" + exception.StackTrace);
}
}
}

private void Window_Closed(object sender, EventArgs e)
{
(sender as Window).Closed -= Window_Closed;
(sender as Window).Owner = null;
if (this.AssociatedObject != null)
return;

var viewmodel = this.AssociatedObject.DataContext as DemoBrowserViewModel;
if (viewmodel == null)
return;

viewmodel.SelectedProduct = null;
viewmodel.SelectedSample = null;
}
}
}
Loading

0 comments on commit f61bffb

Please sign in to comment.