Exemple #1
1
        // Code compiled into PresentationFramework.dll

        // Initialize known object types
        internal static object CreateKnownElement(KnownElements knownElement) 
        {
            object o = null; 
            switch (knownElement) 
            {
                case KnownElements.AccessText: o = new System.Windows.Controls.AccessText();   break; 
                case KnownElements.AdornedElementPlaceholder: o = new System.Windows.Controls.AdornedElementPlaceholder();   break;
                case KnownElements.AdornerDecorator: o = new System.Windows.Documents.AdornerDecorator();   break;
                case KnownElements.AmbientLight: o = new System.Windows.Media.Media3D.AmbientLight();   break;
                case KnownElements.Application: o = new System.Windows.Application();   break; 
                case KnownElements.ArcSegment: o = new System.Windows.Media.ArcSegment();   break;
                case KnownElements.ArrayExtension: o = new System.Windows.Markup.ArrayExtension();   break; 
                case KnownElements.AxisAngleRotation3D: o = new System.Windows.Media.Media3D.AxisAngleRotation3D();   break; 
                case KnownElements.BeginStoryboard: o = new System.Windows.Media.Animation.BeginStoryboard();   break;
                case KnownElements.BevelBitmapEffect: o = new System.Windows.Media.Effects.BevelBitmapEffect();   break; 
                case KnownElements.BezierSegment: o = new System.Windows.Media.BezierSegment();   break;
                case KnownElements.Binding: o = new System.Windows.Data.Binding();   break;
                case KnownElements.BitmapEffectCollection: o = new System.Windows.Media.Effects.BitmapEffectCollection();   break;
                case KnownElements.BitmapEffectGroup: o = new System.Windows.Media.Effects.BitmapEffectGroup();   break; 
                case KnownElements.BitmapEffectInput: o = new System.Windows.Media.Effects.BitmapEffectInput();   break;
                case KnownElements.BitmapImage: o = new System.Windows.Media.Imaging.BitmapImage();   break; 
                case KnownElements.BlockUIContainer: o = new System.Windows.Documents.BlockUIContainer();   break; 
                case KnownElements.BlurBitmapEffect: o = new System.Windows.Media.Effects.BlurBitmapEffect();   break;
                case KnownElements.BmpBitmapEncoder: o = new System.Windows.Media.Imaging.BmpBitmapEncoder();   break; 
                case KnownElements.Bold: o = new System.Windows.Documents.Bold();   break;
                case KnownElements.BoolIListConverter: o = new System.Windows.Media.Converters.BoolIListConverter();   break;
                case KnownElements.BooleanAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.BooleanAnimationUsingKeyFrames();   break;
                case KnownElements.BooleanConverter: o = new System.ComponentModel.BooleanConverter();   break; 
                case KnownElements.BooleanKeyFrameCollection: o = new System.Windows.Media.Animation.BooleanKeyFrameCollection();   break;
                case KnownElements.BooleanToVisibilityConverter: o = new System.Windows.Controls.BooleanToVisibilityConverter();   break; 
                case KnownElements.Border: o = new System.Windows.Controls.Border();   break; 
                case KnownElements.BorderGapMaskConverter: o = new System.Windows.Controls.BorderGapMaskConverter();   break;
                case KnownElements.BrushConverter: o = new System.Windows.Media.BrushConverter();   break; 
                case KnownElements.BulletDecorator: o = new System.Windows.Controls.Primitives.BulletDecorator();   break;
                case KnownElements.Button: o = new System.Windows.Controls.Button();   break;
                case KnownElements.ByteAnimation: o = new System.Windows.Media.Animation.ByteAnimation();   break;
                case KnownElements.ByteAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.ByteAnimationUsingKeyFrames();   break; 
                case KnownElements.ByteConverter: o = new System.ComponentModel.ByteConverter();   break;
                case KnownElements.ByteKeyFrameCollection: o = new System.Windows.Media.Animation.ByteKeyFrameCollection();   break; 
                case KnownElements.Canvas: o = new System.Windows.Controls.Canvas();   break; 
                case KnownElements.CharAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.CharAnimationUsingKeyFrames();   break;
                case KnownElements.CharConverter: o = new System.ComponentModel.CharConverter();   break; 
                case KnownElements.CharIListConverter: o = new System.Windows.Media.Converters.CharIListConverter();   break;
                case KnownElements.CharKeyFrameCollection: o = new System.Windows.Media.Animation.CharKeyFrameCollection();   break;
                case KnownElements.CheckBox: o = new System.Windows.Controls.CheckBox();   break;
                case KnownElements.CollectionContainer: o = new System.Windows.Data.CollectionContainer();   break; 
                case KnownElements.CollectionViewSource: o = new System.Windows.Data.CollectionViewSource();   break;
                case KnownElements.Color: o = new System.Windows.Media.Color();   break; 
                case KnownElements.ColorAnimation: o = new System.Windows.Media.Animation.ColorAnimation();   break; 
                case KnownElements.ColorAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.ColorAnimationUsingKeyFrames();   break;
                case KnownElements.ColorConvertedBitmap: o = new System.Windows.Media.Imaging.ColorConvertedBitmap();   break; 
                case KnownElements.ColorConvertedBitmapExtension: o = new System.Windows.ColorConvertedBitmapExtension();   break;
                case KnownElements.ColorConverter: o = new System.Windows.Media.ColorConverter();   break;
                case KnownElements.ColorKeyFrameCollection: o = new System.Windows.Media.Animation.ColorKeyFrameCollection();   break;
                case KnownElements.ColumnDefinition: o = new System.Windows.Controls.ColumnDefinition();   break; 
                case KnownElements.CombinedGeometry: o = new System.Windows.Media.CombinedGeometry();   break;
                case KnownElements.ComboBox: o = new System.Windows.Controls.ComboBox();   break; 
                case KnownElements.ComboBoxItem: o = new System.Windows.Controls.ComboBoxItem();   break; 
                case KnownElements.CommandConverter: o = new System.Windows.Input.CommandConverter();   break;
                case KnownElements.ComponentResourceKey: o = new System.Windows.ComponentResourceKey();   break; 
                case KnownElements.ComponentResourceKeyConverter: o = new System.Windows.Markup.ComponentResourceKeyConverter();   break;
                case KnownElements.Condition: o = new System.Windows.Condition();   break;
                case KnownElements.ContainerVisual: o = new System.Windows.Media.ContainerVisual();   break;
                case KnownElements.ContentControl: o = new System.Windows.Controls.ContentControl();   break; 
                case KnownElements.ContentElement: o = new System.Windows.ContentElement();   break;
                case KnownElements.ContentPresenter: o = new System.Windows.Controls.ContentPresenter();   break; 
                case KnownElements.ContextMenu: o = new System.Windows.Controls.ContextMenu();   break; 
                case KnownElements.Control: o = new System.Windows.Controls.Control();   break;
                case KnownElements.ControlTemplate: o = new System.Windows.Controls.ControlTemplate();   break; 
                case KnownElements.CornerRadius: o = new System.Windows.CornerRadius();   break;
                case KnownElements.CornerRadiusConverter: o = new System.Windows.CornerRadiusConverter();   break;
                case KnownElements.CroppedBitmap: o = new System.Windows.Media.Imaging.CroppedBitmap();   break;
                case KnownElements.CultureInfoConverter: o = new System.ComponentModel.CultureInfoConverter();   break; 
                case KnownElements.CultureInfoIetfLanguageTagConverter: o = new System.Windows.CultureInfoIetfLanguageTagConverter();   break;
                case KnownElements.CursorConverter: o = new System.Windows.Input.CursorConverter();   break; 
                case KnownElements.DashStyle: o = new System.Windows.Media.DashStyle();   break; 
                case KnownElements.DataTemplate: o = new System.Windows.DataTemplate();   break;
                case KnownElements.DataTemplateKey: o = new System.Windows.DataTemplateKey();   break; 
                case KnownElements.DataTrigger: o = new System.Windows.DataTrigger();   break;
                case KnownElements.DateTimeConverter: o = new System.ComponentModel.DateTimeConverter();   break;
                case KnownElements.DateTimeConverter2: o = new System.Windows.Markup.DateTimeConverter2();   break;
                case KnownElements.DecimalAnimation: o = new System.Windows.Media.Animation.DecimalAnimation();   break; 
                case KnownElements.DecimalAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.DecimalAnimationUsingKeyFrames();   break;
                case KnownElements.DecimalConverter: o = new System.ComponentModel.DecimalConverter();   break; 
                case KnownElements.DecimalKeyFrameCollection: o = new System.Windows.Media.Animation.DecimalKeyFrameCollection();   break; 
                case KnownElements.Decorator: o = new System.Windows.Controls.Decorator();   break;
                case KnownElements.DependencyObject: o = new System.Windows.DependencyObject();   break; 
                case KnownElements.DependencyPropertyConverter: o = new System.Windows.Markup.DependencyPropertyConverter();   break;
                case KnownElements.DialogResultConverter: o = new System.Windows.DialogResultConverter();   break;
                case KnownElements.DiffuseMaterial: o = new System.Windows.Media.Media3D.DiffuseMaterial();   break;
                case KnownElements.DirectionalLight: o = new System.Windows.Media.Media3D.DirectionalLight();   break; 
                case KnownElements.DiscreteBooleanKeyFrame: o = new System.Windows.Media.Animation.DiscreteBooleanKeyFrame();   break;
                case KnownElements.DiscreteByteKeyFrame: o = new System.Windows.Media.Animation.DiscreteByteKeyFrame();   break; 
                case KnownElements.DiscreteCharKeyFrame: o = new System.Windows.Media.Animation.DiscreteCharKeyFrame();   break; 
                case KnownElements.DiscreteColorKeyFrame: o = new System.Windows.Media.Animation.DiscreteColorKeyFrame();   break;
                case KnownElements.DiscreteDecimalKeyFrame: o = new System.Windows.Media.Animation.DiscreteDecimalKeyFrame();   break; 
                case KnownElements.DiscreteDoubleKeyFrame: o = new System.Windows.Media.Animation.DiscreteDoubleKeyFrame();   break;
                case KnownElements.DiscreteInt16KeyFrame: o = new System.Windows.Media.Animation.DiscreteInt16KeyFrame();   break;
                case KnownElements.DiscreteInt32KeyFrame: o = new System.Windows.Media.Animation.DiscreteInt32KeyFrame();   break;
                case KnownElements.DiscreteInt64KeyFrame: o = new System.Windows.Media.Animation.DiscreteInt64KeyFrame();   break; 
                case KnownElements.DiscreteMatrixKeyFrame: o = new System.Windows.Media.Animation.DiscreteMatrixKeyFrame();   break;
                case KnownElements.DiscreteObjectKeyFrame: o = new System.Windows.Media.Animation.DiscreteObjectKeyFrame();   break; 
                case KnownElements.DiscretePoint3DKeyFrame: o = new System.Windows.Media.Animation.DiscretePoint3DKeyFrame();   break; 
                case KnownElements.DiscretePointKeyFrame: o = new System.Windows.Media.Animation.DiscretePointKeyFrame();   break;
                case KnownElements.DiscreteQuaternionKeyFrame: o = new System.Windows.Media.Animation.DiscreteQuaternionKeyFrame();   break; 
                case KnownElements.DiscreteRectKeyFrame: o = new System.Windows.Media.Animation.DiscreteRectKeyFrame();   break;
                case KnownElements.DiscreteRotation3DKeyFrame: o = new System.Windows.Media.Animation.DiscreteRotation3DKeyFrame();   break;
                case KnownElements.DiscreteSingleKeyFrame: o = new System.Windows.Media.Animation.DiscreteSingleKeyFrame();   break;
                case KnownElements.DiscreteSizeKeyFrame: o = new System.Windows.Media.Animation.DiscreteSizeKeyFrame();   break; 
                case KnownElements.DiscreteStringKeyFrame: o = new System.Windows.Media.Animation.DiscreteStringKeyFrame();   break;
                case KnownElements.DiscreteThicknessKeyFrame: o = new System.Windows.Media.Animation.DiscreteThicknessKeyFrame();   break; 
                case KnownElements.DiscreteVector3DKeyFrame: o = new System.Windows.Media.Animation.DiscreteVector3DKeyFrame();   break; 
                case KnownElements.DiscreteVectorKeyFrame: o = new System.Windows.Media.Animation.DiscreteVectorKeyFrame();   break;
                case KnownElements.DockPanel: o = new System.Windows.Controls.DockPanel();   break; 
                case KnownElements.DocumentPageView: o = new System.Windows.Controls.Primitives.DocumentPageView();   break;
                case KnownElements.DocumentReference: o = new System.Windows.Documents.DocumentReference();   break;
                case KnownElements.DocumentViewer: o = new System.Windows.Controls.DocumentViewer();   break;
                case KnownElements.DoubleAnimation: o = new System.Windows.Media.Animation.DoubleAnimation();   break; 
                case KnownElements.DoubleAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.DoubleAnimationUsingKeyFrames();   break;
                case KnownElements.DoubleAnimationUsingPath: o = new System.Windows.Media.Animation.DoubleAnimationUsingPath();   break; 
                case KnownElements.DoubleCollection: o = new System.Windows.Media.DoubleCollection();   break; 
                case KnownElements.DoubleCollectionConverter: o = new System.Windows.Media.DoubleCollectionConverter();   break;
                case KnownElements.DoubleConverter: o = new System.ComponentModel.DoubleConverter();   break; 
                case KnownElements.DoubleIListConverter: o = new System.Windows.Media.Converters.DoubleIListConverter();   break;
                case KnownElements.DoubleKeyFrameCollection: o = new System.Windows.Media.Animation.DoubleKeyFrameCollection();   break;
                case KnownElements.DrawingBrush: o = new System.Windows.Media.DrawingBrush();   break;
                case KnownElements.DrawingCollection: o = new System.Windows.Media.DrawingCollection();   break; 
                case KnownElements.DrawingGroup: o = new System.Windows.Media.DrawingGroup();   break;
                case KnownElements.DrawingImage: o = new System.Windows.Media.DrawingImage();   break; 
                case KnownElements.DrawingVisual: o = new System.Windows.Media.DrawingVisual();   break; 
                case KnownElements.DropShadowBitmapEffect: o = new System.Windows.Media.Effects.DropShadowBitmapEffect();   break;
                case KnownElements.Duration: o = new System.Windows.Duration();   break; 
                case KnownElements.DurationConverter: o = new System.Windows.DurationConverter();   break;
                case KnownElements.DynamicResourceExtension: o = new System.Windows.DynamicResourceExtension();   break;
                case KnownElements.DynamicResourceExtensionConverter: o = new System.Windows.DynamicResourceExtensionConverter();   break;
                case KnownElements.Ellipse: o = new System.Windows.Shapes.Ellipse();   break; 
                case KnownElements.EllipseGeometry: o = new System.Windows.Media.EllipseGeometry();   break;
                case KnownElements.EmbossBitmapEffect: o = new System.Windows.Media.Effects.EmbossBitmapEffect();   break; 
                case KnownElements.EmissiveMaterial: o = new System.Windows.Media.Media3D.EmissiveMaterial();   break; 
                case KnownElements.EventSetter: o = new System.Windows.EventSetter();   break;
                case KnownElements.EventTrigger: o = new System.Windows.EventTrigger();   break; 
                case KnownElements.Expander: o = new System.Windows.Controls.Expander();   break;
                case KnownElements.ExpressionConverter: o = new System.Windows.ExpressionConverter();   break;
                case KnownElements.Figure: o = new System.Windows.Documents.Figure();   break;
                case KnownElements.FigureLength: o = new System.Windows.FigureLength();   break; 
                case KnownElements.FigureLengthConverter: o = new System.Windows.FigureLengthConverter();   break;
                case KnownElements.FixedDocument: o = new System.Windows.Documents.FixedDocument();   break; 
                case KnownElements.FixedDocumentSequence: o = new System.Windows.Documents.FixedDocumentSequence();   break; 
                case KnownElements.FixedPage: o = new System.Windows.Documents.FixedPage();   break;
                case KnownElements.Floater: o = new System.Windows.Documents.Floater();   break; 
                case KnownElements.FlowDocument: o = new System.Windows.Documents.FlowDocument();   break;
                case KnownElements.FlowDocumentPageViewer: o = new System.Windows.Controls.FlowDocumentPageViewer();   break;
                case KnownElements.FlowDocumentReader: o = new System.Windows.Controls.FlowDocumentReader();   break;
                case KnownElements.FlowDocumentScrollViewer: o = new System.Windows.Controls.FlowDocumentScrollViewer();   break; 
                case KnownElements.FontFamily: o = new System.Windows.Media.FontFamily();   break;
                case KnownElements.FontFamilyConverter: o = new System.Windows.Media.FontFamilyConverter();   break; 
                case KnownElements.FontSizeConverter: o = new System.Windows.FontSizeConverter();   break; 
                case KnownElements.FontStretch: o = new System.Windows.FontStretch();   break;
                case KnownElements.FontStretchConverter: o = new System.Windows.FontStretchConverter();   break; 
                case KnownElements.FontStyle: o = new System.Windows.FontStyle();   break;
                case KnownElements.FontStyleConverter: o = new System.Windows.FontStyleConverter();   break;
                case KnownElements.FontWeight: o = new System.Windows.FontWeight();   break;
                case KnownElements.FontWeightConverter: o = new System.Windows.FontWeightConverter();   break; 
                case KnownElements.FormatConvertedBitmap: o = new System.Windows.Media.Imaging.FormatConvertedBitmap();   break;
                case KnownElements.Frame: o = new System.Windows.Controls.Frame();   break; 
                case KnownElements.FrameworkContentElement: o = new System.Windows.FrameworkContentElement();   break; 
                case KnownElements.FrameworkElement: o = new System.Windows.FrameworkElement();   break;
                case KnownElements.FrameworkElementFactory: o = new System.Windows.FrameworkElementFactory();   break; 
                case KnownElements.FrameworkPropertyMetadata: o = new System.Windows.FrameworkPropertyMetadata();   break;
                case KnownElements.GeneralTransformCollection: o = new System.Windows.Media.GeneralTransformCollection();   break;
                case KnownElements.GeneralTransformGroup: o = new System.Windows.Media.GeneralTransformGroup();   break;
                case KnownElements.GeometryCollection: o = new System.Windows.Media.GeometryCollection();   break; 
                case KnownElements.GeometryConverter: o = new System.Windows.Media.GeometryConverter();   break;
                case KnownElements.GeometryDrawing: o = new System.Windows.Media.GeometryDrawing();   break; 
                case KnownElements.GeometryGroup: o = new System.Windows.Media.GeometryGroup();   break; 
                case KnownElements.GeometryModel3D: o = new System.Windows.Media.Media3D.GeometryModel3D();   break;
                case KnownElements.GestureRecognizer: o = new System.Windows.Ink.GestureRecognizer();   break; 
                case KnownElements.GifBitmapEncoder: o = new System.Windows.Media.Imaging.GifBitmapEncoder();   break;
                case KnownElements.GlyphRun: o = new System.Windows.Media.GlyphRun();   break;
                case KnownElements.GlyphRunDrawing: o = new System.Windows.Media.GlyphRunDrawing();   break;
                case KnownElements.GlyphTypeface: o = new System.Windows.Media.GlyphTypeface();   break; 
                case KnownElements.Glyphs: o = new System.Windows.Documents.Glyphs();   break;
                case KnownElements.GradientStop: o = new System.Windows.Media.GradientStop();   break; 
                case KnownElements.GradientStopCollection: o = new System.Windows.Media.GradientStopCollection();   break; 
                case KnownElements.Grid: o = new System.Windows.Controls.Grid();   break;
                case KnownElements.GridLength: o = new System.Windows.GridLength();   break; 
                case KnownElements.GridLengthConverter: o = new System.Windows.GridLengthConverter();   break;
                case KnownElements.GridSplitter: o = new System.Windows.Controls.GridSplitter();   break;
                case KnownElements.GridView: o = new System.Windows.Controls.GridView();   break;
                case KnownElements.GridViewColumn: o = new System.Windows.Controls.GridViewColumn();   break; 
                case KnownElements.GridViewColumnHeader: o = new System.Windows.Controls.GridViewColumnHeader();   break;
                case KnownElements.GridViewHeaderRowPresenter: o = new System.Windows.Controls.GridViewHeaderRowPresenter();   break; 
                case KnownElements.GridViewRowPresenter: o = new System.Windows.Controls.GridViewRowPresenter();   break; 
                case KnownElements.GroupBox: o = new System.Windows.Controls.GroupBox();   break;
                case KnownElements.GroupItem: o = new System.Windows.Controls.GroupItem();   break; 
                case KnownElements.GuidConverter: o = new System.ComponentModel.GuidConverter();   break;
                case KnownElements.GuidelineSet: o = new System.Windows.Media.GuidelineSet();   break;
                case KnownElements.HeaderedContentControl: o = new System.Windows.Controls.HeaderedContentControl();   break;
                case KnownElements.HeaderedItemsControl: o = new System.Windows.Controls.HeaderedItemsControl();   break; 
                case KnownElements.HierarchicalDataTemplate: o = new System.Windows.HierarchicalDataTemplate();   break;
                case KnownElements.HostVisual: o = new System.Windows.Media.HostVisual();   break; 
                case KnownElements.Hyperlink: o = new System.Windows.Documents.Hyperlink();   break; 
                case KnownElements.Image: o = new System.Windows.Controls.Image();   break;
                case KnownElements.ImageBrush: o = new System.Windows.Media.ImageBrush();   break; 
                case KnownElements.ImageDrawing: o = new System.Windows.Media.ImageDrawing();   break;
                case KnownElements.ImageSourceConverter: o = new System.Windows.Media.ImageSourceConverter();   break;
                case KnownElements.InkCanvas: o = new System.Windows.Controls.InkCanvas();   break;
                case KnownElements.InkPresenter: o = new System.Windows.Controls.InkPresenter();   break; 
                case KnownElements.InlineUIContainer: o = new System.Windows.Documents.InlineUIContainer();   break;
                case KnownElements.InputScope: o = new System.Windows.Input.InputScope();   break; 
                case KnownElements.InputScopeConverter: o = new System.Windows.Input.InputScopeConverter();   break; 
                case KnownElements.InputScopeName: o = new System.Windows.Input.InputScopeName();   break;
                case KnownElements.InputScopeNameConverter: o = new System.Windows.Input.InputScopeNameConverter();   break; 
                case KnownElements.Int16Animation: o = new System.Windows.Media.Animation.Int16Animation();   break;
                case KnownElements.Int16AnimationUsingKeyFrames: o = new System.Windows.Media.Animation.Int16AnimationUsingKeyFrames();   break;
                case KnownElements.Int16Converter: o = new System.ComponentModel.Int16Converter();   break;
                case KnownElements.Int16KeyFrameCollection: o = new System.Windows.Media.Animation.Int16KeyFrameCollection();   break; 
                case KnownElements.Int32Animation: o = new System.Windows.Media.Animation.Int32Animation();   break;
                case KnownElements.Int32AnimationUsingKeyFrames: o = new System.Windows.Media.Animation.Int32AnimationUsingKeyFrames();   break; 
                case KnownElements.Int32Collection: o = new System.Windows.Media.Int32Collection();   break; 
                case KnownElements.Int32CollectionConverter: o = new System.Windows.Media.Int32CollectionConverter();   break;
                case KnownElements.Int32Converter: o = new System.ComponentModel.Int32Converter();   break; 
                case KnownElements.Int32KeyFrameCollection: o = new System.Windows.Media.Animation.Int32KeyFrameCollection();   break;
                case KnownElements.Int32Rect: o = new System.Windows.Int32Rect();   break;
                case KnownElements.Int32RectConverter: o = new System.Windows.Int32RectConverter();   break;
                case KnownElements.Int64Animation: o = new System.Windows.Media.Animation.Int64Animation();   break; 
                case KnownElements.Int64AnimationUsingKeyFrames: o = new System.Windows.Media.Animation.Int64AnimationUsingKeyFrames();   break;
                case KnownElements.Int64Converter: o = new System.ComponentModel.Int64Converter();   break; 
                case KnownElements.Int64KeyFrameCollection: o = new System.Windows.Media.Animation.Int64KeyFrameCollection();   break; 
                case KnownElements.Italic: o = new System.Windows.Documents.Italic();   break;
                case KnownElements.ItemsControl: o = new System.Windows.Controls.ItemsControl();   break; 
                case KnownElements.ItemsPanelTemplate: o = new System.Windows.Controls.ItemsPanelTemplate();   break;
                case KnownElements.ItemsPresenter: o = new System.Windows.Controls.ItemsPresenter();   break;
                case KnownElements.JournalEntryListConverter: o = new System.Windows.Navigation.JournalEntryListConverter();   break;
                case KnownElements.JournalEntryUnifiedViewConverter: o = new System.Windows.Navigation.JournalEntryUnifiedViewConverter();   break; 
                case KnownElements.JpegBitmapEncoder: o = new System.Windows.Media.Imaging.JpegBitmapEncoder();   break;
                case KnownElements.KeyBinding: o = new System.Windows.Input.KeyBinding();   break; 
                case KnownElements.KeyConverter: o = new System.Windows.Input.KeyConverter();   break; 
                case KnownElements.KeyGestureConverter: o = new System.Windows.Input.KeyGestureConverter();   break;
                case KnownElements.KeySpline: o = new System.Windows.Media.Animation.KeySpline();   break; 
                case KnownElements.KeySplineConverter: o = new System.Windows.KeySplineConverter();   break;
                case KnownElements.KeyTime: o = new System.Windows.Media.Animation.KeyTime();   break;
                case KnownElements.KeyTimeConverter: o = new System.Windows.KeyTimeConverter();   break;
                case KnownElements.Label: o = new System.Windows.Controls.Label();   break; 
                case KnownElements.LengthConverter: o = new System.Windows.LengthConverter();   break;
                case KnownElements.Line: o = new System.Windows.Shapes.Line();   break; 
                case KnownElements.LineBreak: o = new System.Windows.Documents.LineBreak();   break; 
                case KnownElements.LineGeometry: o = new System.Windows.Media.LineGeometry();   break;
                case KnownElements.LineSegment: o = new System.Windows.Media.LineSegment();   break; 
                case KnownElements.LinearByteKeyFrame: o = new System.Windows.Media.Animation.LinearByteKeyFrame();   break;
                case KnownElements.LinearColorKeyFrame: o = new System.Windows.Media.Animation.LinearColorKeyFrame();   break;
                case KnownElements.LinearDecimalKeyFrame: o = new System.Windows.Media.Animation.LinearDecimalKeyFrame();   break;
                case KnownElements.LinearDoubleKeyFrame: o = new System.Windows.Media.Animation.LinearDoubleKeyFrame();   break; 
                case KnownElements.LinearGradientBrush: o = new System.Windows.Media.LinearGradientBrush();   break;
                case KnownElements.LinearInt16KeyFrame: o = new System.Windows.Media.Animation.LinearInt16KeyFrame();   break; 
                case KnownElements.LinearInt32KeyFrame: o = new System.Windows.Media.Animation.LinearInt32KeyFrame();   break; 
                case KnownElements.LinearInt64KeyFrame: o = new System.Windows.Media.Animation.LinearInt64KeyFrame();   break;
                case KnownElements.LinearPoint3DKeyFrame: o = new System.Windows.Media.Animation.LinearPoint3DKeyFrame();   break; 
                case KnownElements.LinearPointKeyFrame: o = new System.Windows.Media.Animation.LinearPointKeyFrame();   break;
                case KnownElements.LinearQuaternionKeyFrame: o = new System.Windows.Media.Animation.LinearQuaternionKeyFrame();   break;
                case KnownElements.LinearRectKeyFrame: o = new System.Windows.Media.Animation.LinearRectKeyFrame();   break;
                case KnownElements.LinearRotation3DKeyFrame: o = new System.Windows.Media.Animation.LinearRotation3DKeyFrame();   break; 
                case KnownElements.LinearSingleKeyFrame: o = new System.Windows.Media.Animation.LinearSingleKeyFrame();   break;
                case KnownElements.LinearSizeKeyFrame: o = new System.Windows.Media.Animation.LinearSizeKeyFrame();   break; 
                case KnownElements.LinearThicknessKeyFrame: o = new System.Windows.Media.Animation.LinearThicknessKeyFrame();   break; 
                case KnownElements.LinearVector3DKeyFrame: o = new System.Windows.Media.Animation.LinearVector3DKeyFrame();   break;
                case KnownElements.LinearVectorKeyFrame: o = new System.Windows.Media.Animation.LinearVectorKeyFrame();   break; 
                case KnownElements.List: o = new System.Windows.Documents.List();   break;
                case KnownElements.ListBox: o = new System.Windows.Controls.ListBox();   break;
                case KnownElements.ListBoxItem: o = new System.Windows.Controls.ListBoxItem();   break;
                case KnownElements.ListItem: o = new System.Windows.Documents.ListItem();   break; 
                case KnownElements.ListView: o = new System.Windows.Controls.ListView();   break;
                case KnownElements.ListViewItem: o = new System.Windows.Controls.ListViewItem();   break; 
                case KnownElements.MaterialCollection: o = new System.Windows.Media.Media3D.MaterialCollection();   break; 
                case KnownElements.MaterialGroup: o = new System.Windows.Media.Media3D.MaterialGroup();   break;
                case KnownElements.Matrix: o = new System.Windows.Media.Matrix();   break; 
                case KnownElements.Matrix3D: o = new System.Windows.Media.Media3D.Matrix3D();   break;
                case KnownElements.Matrix3DConverter: o = new System.Windows.Media.Media3D.Matrix3DConverter();   break;
                case KnownElements.MatrixAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.MatrixAnimationUsingKeyFrames();   break;
                case KnownElements.MatrixAnimationUsingPath: o = new System.Windows.Media.Animation.MatrixAnimationUsingPath();   break; 
                case KnownElements.MatrixCamera: o = new System.Windows.Media.Media3D.MatrixCamera();   break;
                case KnownElements.MatrixConverter: o = new System.Windows.Media.MatrixConverter();   break; 
                case KnownElements.MatrixKeyFrameCollection: o = new System.Windows.Media.Animation.MatrixKeyFrameCollection();   break; 
                case KnownElements.MatrixTransform: o = new System.Windows.Media.MatrixTransform();   break;
                case KnownElements.MatrixTransform3D: o = new System.Windows.Media.Media3D.MatrixTransform3D();   break; 
                case KnownElements.MediaElement: o = new System.Windows.Controls.MediaElement();   break;
                case KnownElements.MediaPlayer: o = new System.Windows.Media.MediaPlayer();   break;
                case KnownElements.MediaTimeline: o = new System.Windows.Media.MediaTimeline();   break;
                case KnownElements.Menu: o = new System.Windows.Controls.Menu();   break; 
                case KnownElements.MenuItem: o = new System.Windows.Controls.MenuItem();   break;
                case KnownElements.MenuScrollingVisibilityConverter: o = new System.Windows.Controls.MenuScrollingVisibilityConverter();   break; 
                case KnownElements.MeshGeometry3D: o = new System.Windows.Media.Media3D.MeshGeometry3D();   break; 
                case KnownElements.Model3DCollection: o = new System.Windows.Media.Media3D.Model3DCollection();   break;
                case KnownElements.Model3DGroup: o = new System.Windows.Media.Media3D.Model3DGroup();   break; 
                case KnownElements.ModelVisual3D: o = new System.Windows.Media.Media3D.ModelVisual3D();   break;
                case KnownElements.ModifierKeysConverter: o = new System.Windows.Input.ModifierKeysConverter();   break;
                case KnownElements.MouseActionConverter: o = new System.Windows.Input.MouseActionConverter();   break;
                case KnownElements.MouseBinding: o = new System.Windows.Input.MouseBinding();   break; 
                case KnownElements.MouseGesture: o = new System.Windows.Input.MouseGesture();   break;
                case KnownElements.MouseGestureConverter: o = new System.Windows.Input.MouseGestureConverter();   break; 
                case KnownElements.MultiBinding: o = new System.Windows.Data.MultiBinding();   break; 
                case KnownElements.MultiDataTrigger: o = new System.Windows.MultiDataTrigger();   break;
                case KnownElements.MultiTrigger: o = new System.Windows.MultiTrigger();   break; 
                case KnownElements.NameScope: o = new System.Windows.NameScope();   break;
                case KnownElements.NavigationWindow: o = new System.Windows.Navigation.NavigationWindow();   break;
                case KnownElements.NullExtension: o = new System.Windows.Markup.NullExtension();   break;
                case KnownElements.NullableBoolConverter: o = new System.Windows.NullableBoolConverter();   break; 
                case KnownElements.NumberSubstitution: o = new System.Windows.Media.NumberSubstitution();   break;
                case KnownElements.Object: o = new System.Object();   break; 
                case KnownElements.ObjectAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.ObjectAnimationUsingKeyFrames();   break; 
                case KnownElements.ObjectDataProvider: o = new System.Windows.Data.ObjectDataProvider();   break;
                case KnownElements.ObjectKeyFrameCollection: o = new System.Windows.Media.Animation.ObjectKeyFrameCollection();   break; 
                case KnownElements.OrthographicCamera: o = new System.Windows.Media.Media3D.OrthographicCamera();   break;
                case KnownElements.OuterGlowBitmapEffect: o = new System.Windows.Media.Effects.OuterGlowBitmapEffect();   break;
                case KnownElements.Page: o = new System.Windows.Controls.Page();   break;
                case KnownElements.PageContent: o = new System.Windows.Documents.PageContent();   break; 
                case KnownElements.Paragraph: o = new System.Windows.Documents.Paragraph();   break;
                case KnownElements.ParallelTimeline: o = new System.Windows.Media.Animation.ParallelTimeline();   break; 
                case KnownElements.ParserContext: o = new System.Windows.Markup.ParserContext();   break; 
                case KnownElements.PasswordBox: o = new System.Windows.Controls.PasswordBox();   break;
                case KnownElements.Path: o = new System.Windows.Shapes.Path();   break; 
                case KnownElements.PathFigure: o = new System.Windows.Media.PathFigure();   break;
                case KnownElements.PathFigureCollection: o = new System.Windows.Media.PathFigureCollection();   break;
                case KnownElements.PathFigureCollectionConverter: o = new System.Windows.Media.PathFigureCollectionConverter();   break;
                case KnownElements.PathGeometry: o = new System.Windows.Media.PathGeometry();   break; 
                case KnownElements.PathSegmentCollection: o = new System.Windows.Media.PathSegmentCollection();   break;
                case KnownElements.PauseStoryboard: o = new System.Windows.Media.Animation.PauseStoryboard();   break; 
                case KnownElements.Pen: o = new System.Windows.Media.Pen();   break; 
                case KnownElements.PerspectiveCamera: o = new System.Windows.Media.Media3D.PerspectiveCamera();   break;
                case KnownElements.PixelFormat: o = new System.Windows.Media.PixelFormat();   break; 
                case KnownElements.PixelFormatConverter: o = new System.Windows.Media.PixelFormatConverter();   break;
                case KnownElements.PngBitmapEncoder: o = new System.Windows.Media.Imaging.PngBitmapEncoder();   break;
                case KnownElements.Point: o = new System.Windows.Point();   break;
                case KnownElements.Point3D: o = new System.Windows.Media.Media3D.Point3D();   break; 
                case KnownElements.Point3DAnimation: o = new System.Windows.Media.Animation.Point3DAnimation();   break;
                case KnownElements.Point3DAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.Point3DAnimationUsingKeyFrames();   break; 
                case KnownElements.Point3DCollection: o = new System.Windows.Media.Media3D.Point3DCollection();   break; 
                case KnownElements.Point3DCollectionConverter: o = new System.Windows.Media.Media3D.Point3DCollectionConverter();   break;
                case KnownElements.Point3DConverter: o = new System.Windows.Media.Media3D.Point3DConverter();   break; 
                case KnownElements.Point3DKeyFrameCollection: o = new System.Windows.Media.Animation.Point3DKeyFrameCollection();   break;
                case KnownElements.Point4D: o = new System.Windows.Media.Media3D.Point4D();   break;
                case KnownElements.Point4DConverter: o = new System.Windows.Media.Media3D.Point4DConverter();   break;
                case KnownElements.PointAnimation: o = new System.Windows.Media.Animation.PointAnimation();   break; 
                case KnownElements.PointAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.PointAnimationUsingKeyFrames();   break;
                case KnownElements.PointAnimationUsingPath: o = new System.Windows.Media.Animation.PointAnimationUsingPath();   break; 
                case KnownElements.PointCollection: o = new System.Windows.Media.PointCollection();   break; 
                case KnownElements.PointCollectionConverter: o = new System.Windows.Media.PointCollectionConverter();   break;
                case KnownElements.PointConverter: o = new System.Windows.PointConverter();   break; 
                case KnownElements.PointIListConverter: o = new System.Windows.Media.Converters.PointIListConverter();   break;
                case KnownElements.PointKeyFrameCollection: o = new System.Windows.Media.Animation.PointKeyFrameCollection();   break;
                case KnownElements.PointLight: o = new System.Windows.Media.Media3D.PointLight();   break;
                case KnownElements.PolyBezierSegment: o = new System.Windows.Media.PolyBezierSegment();   break; 
                case KnownElements.PolyLineSegment: o = new System.Windows.Media.PolyLineSegment();   break;
                case KnownElements.PolyQuadraticBezierSegment: o = new System.Windows.Media.PolyQuadraticBezierSegment();   break; 
                case KnownElements.Polygon: o = new System.Windows.Shapes.Polygon();   break; 
                case KnownElements.Polyline: o = new System.Windows.Shapes.Polyline();   break;
                case KnownElements.Popup: o = new System.Windows.Controls.Primitives.Popup();   break; 
                case KnownElements.PriorityBinding: o = new System.Windows.Data.PriorityBinding();   break;
                case KnownElements.ProgressBar: o = new System.Windows.Controls.ProgressBar();   break;
                case KnownElements.PropertyPathConverter: o = new System.Windows.PropertyPathConverter();   break;
                case KnownElements.QuadraticBezierSegment: o = new System.Windows.Media.QuadraticBezierSegment();   break; 
                case KnownElements.Quaternion: o = new System.Windows.Media.Media3D.Quaternion();   break;
                case KnownElements.QuaternionAnimation: o = new System.Windows.Media.Animation.QuaternionAnimation();   break; 
                case KnownElements.QuaternionAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.QuaternionAnimationUsingKeyFrames();   break; 
                case KnownElements.QuaternionConverter: o = new System.Windows.Media.Media3D.QuaternionConverter();   break;
                case KnownElements.QuaternionKeyFrameCollection: o = new System.Windows.Media.Animation.QuaternionKeyFrameCollection();   break; 
                case KnownElements.QuaternionRotation3D: o = new System.Windows.Media.Media3D.QuaternionRotation3D();   break;
                case KnownElements.RadialGradientBrush: o = new System.Windows.Media.RadialGradientBrush();   break;
                case KnownElements.RadioButton: o = new System.Windows.Controls.RadioButton();   break;
                case KnownElements.Rect: o = new System.Windows.Rect();   break; 
                case KnownElements.Rect3D: o = new System.Windows.Media.Media3D.Rect3D();   break;
                case KnownElements.Rect3DConverter: o = new System.Windows.Media.Media3D.Rect3DConverter();   break; 
                case KnownElements.RectAnimation: o = new System.Windows.Media.Animation.RectAnimation();   break; 
                case KnownElements.RectAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.RectAnimationUsingKeyFrames();   break;
                case KnownElements.RectConverter: o = new System.Windows.RectConverter();   break; 
                case KnownElements.RectKeyFrameCollection: o = new System.Windows.Media.Animation.RectKeyFrameCollection();   break;
                case KnownElements.Rectangle: o = new System.Windows.Shapes.Rectangle();   break;
                case KnownElements.RectangleGeometry: o = new System.Windows.Media.RectangleGeometry();   break;
                case KnownElements.RelativeSource: o = new System.Windows.Data.RelativeSource();   break; 
                case KnownElements.RemoveStoryboard: o = new System.Windows.Media.Animation.RemoveStoryboard();   break;
                case KnownElements.RepeatBehavior: o = new System.Windows.Media.Animation.RepeatBehavior();   break; 
                case KnownElements.RepeatBehaviorConverter: o = new System.Windows.Media.Animation.RepeatBehaviorConverter();   break; 
                case KnownElements.RepeatButton: o = new System.Windows.Controls.Primitives.RepeatButton();   break;
                case KnownElements.ResizeGrip: o = new System.Windows.Controls.Primitives.ResizeGrip();   break; 
                case KnownElements.ResourceDictionary: o = new System.Windows.ResourceDictionary();   break;
                case KnownElements.ResumeStoryboard: o = new System.Windows.Media.Animation.ResumeStoryboard();   break;
                case KnownElements.RichTextBox: o = new System.Windows.Controls.RichTextBox();   break;
                case KnownElements.RotateTransform: o = new System.Windows.Media.RotateTransform();   break; 
                case KnownElements.RotateTransform3D: o = new System.Windows.Media.Media3D.RotateTransform3D();   break;
                case KnownElements.Rotation3DAnimation: o = new System.Windows.Media.Animation.Rotation3DAnimation();   break; 
                case KnownElements.Rotation3DAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.Rotation3DAnimationUsingKeyFrames();   break; 
                case KnownElements.Rotation3DKeyFrameCollection: o = new System.Windows.Media.Animation.Rotation3DKeyFrameCollection();   break;
                case KnownElements.RoutedCommand: o = new System.Windows.Input.RoutedCommand();   break; 
                case KnownElements.RoutedEventConverter: o = new System.Windows.Markup.RoutedEventConverter();   break;
                case KnownElements.RoutedUICommand: o = new System.Windows.Input.RoutedUICommand();   break;
                case KnownElements.RowDefinition: o = new System.Windows.Controls.RowDefinition();   break;
                case KnownElements.Run: o = new System.Windows.Documents.Run();   break; 
                case KnownElements.SByteConverter: o = new System.ComponentModel.SByteConverter();   break;
                case KnownElements.ScaleTransform: o = new System.Windows.Media.ScaleTransform();   break; 
                case KnownElements.ScaleTransform3D: o = new System.Windows.Media.Media3D.ScaleTransform3D();   break; 
                case KnownElements.ScrollBar: o = new System.Windows.Controls.Primitives.ScrollBar();   break;
                case KnownElements.ScrollContentPresenter: o = new System.Windows.Controls.ScrollContentPresenter();   break; 
                case KnownElements.ScrollViewer: o = new System.Windows.Controls.ScrollViewer();   break;
                case KnownElements.Section: o = new System.Windows.Documents.Section();   break;
                case KnownElements.SeekStoryboard: o = new System.Windows.Media.Animation.SeekStoryboard();   break;
                case KnownElements.Separator: o = new System.Windows.Controls.Separator();   break; 
                case KnownElements.SetStoryboardSpeedRatio: o = new System.Windows.Media.Animation.SetStoryboardSpeedRatio();   break;
                case KnownElements.Setter: o = new System.Windows.Setter();   break; 
                case KnownElements.SingleAnimation: o = new System.Windows.Media.Animation.SingleAnimation();   break; 
                case KnownElements.SingleAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.SingleAnimationUsingKeyFrames();   break;
                case KnownElements.SingleConverter: o = new System.ComponentModel.SingleConverter();   break; 
                case KnownElements.SingleKeyFrameCollection: o = new System.Windows.Media.Animation.SingleKeyFrameCollection();   break;
                case KnownElements.Size: o = new System.Windows.Size();   break;
                case KnownElements.Size3D: o = new System.Windows.Media.Media3D.Size3D();   break;
                case KnownElements.Size3DConverter: o = new System.Windows.Media.Media3D.Size3DConverter();   break; 
                case KnownElements.SizeAnimation: o = new System.Windows.Media.Animation.SizeAnimation();   break;
                case KnownElements.SizeAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.SizeAnimationUsingKeyFrames();   break; 
                case KnownElements.SizeConverter: o = new System.Windows.SizeConverter();   break; 
                case KnownElements.SizeKeyFrameCollection: o = new System.Windows.Media.Animation.SizeKeyFrameCollection();   break;
                case KnownElements.SkewTransform: o = new System.Windows.Media.SkewTransform();   break; 
                case KnownElements.SkipStoryboardToFill: o = new System.Windows.Media.Animation.SkipStoryboardToFill();   break;
                case KnownElements.Slider: o = new System.Windows.Controls.Slider();   break;
                case KnownElements.SolidColorBrush: o = new System.Windows.Media.SolidColorBrush();   break;
                case KnownElements.SoundPlayerAction: o = new System.Windows.Controls.SoundPlayerAction();   break; 
                case KnownElements.Span: o = new System.Windows.Documents.Span();   break;
                case KnownElements.SpecularMaterial: o = new System.Windows.Media.Media3D.SpecularMaterial();   break; 
                case KnownElements.SplineByteKeyFrame: o = new System.Windows.Media.Animation.SplineByteKeyFrame();   break; 
                case KnownElements.SplineColorKeyFrame: o = new System.Windows.Media.Animation.SplineColorKeyFrame();   break;
                case KnownElements.SplineDecimalKeyFrame: o = new System.Windows.Media.Animation.SplineDecimalKeyFrame();   break; 
                case KnownElements.SplineDoubleKeyFrame: o = new System.Windows.Media.Animation.SplineDoubleKeyFrame();   break;
                case KnownElements.SplineInt16KeyFrame: o = new System.Windows.Media.Animation.SplineInt16KeyFrame();   break;
                case KnownElements.SplineInt32KeyFrame: o = new System.Windows.Media.Animation.SplineInt32KeyFrame();   break;
                case KnownElements.SplineInt64KeyFrame: o = new System.Windows.Media.Animation.SplineInt64KeyFrame();   break; 
                case KnownElements.SplinePoint3DKeyFrame: o = new System.Windows.Media.Animation.SplinePoint3DKeyFrame();   break;
                case KnownElements.SplinePointKeyFrame: o = new System.Windows.Media.Animation.SplinePointKeyFrame();   break; 
                case KnownElements.SplineQuaternionKeyFrame: o = new System.Windows.Media.Animation.SplineQuaternionKeyFrame();   break; 
                case KnownElements.SplineRectKeyFrame: o = new System.Windows.Media.Animation.SplineRectKeyFrame();   break;
                case KnownElements.SplineRotation3DKeyFrame: o = new System.Windows.Media.Animation.SplineRotation3DKeyFrame();   break; 
                case KnownElements.SplineSingleKeyFrame: o = new System.Windows.Media.Animation.SplineSingleKeyFrame();   break;
                case KnownElements.SplineSizeKeyFrame: o = new System.Windows.Media.Animation.SplineSizeKeyFrame();   break;
                case KnownElements.SplineThicknessKeyFrame: o = new System.Windows.Media.Animation.SplineThicknessKeyFrame();   break;
                case KnownElements.SplineVector3DKeyFrame: o = new System.Windows.Media.Animation.SplineVector3DKeyFrame();   break; 
                case KnownElements.SplineVectorKeyFrame: o = new System.Windows.Media.Animation.SplineVectorKeyFrame();   break;
                case KnownElements.SpotLight: o = new System.Windows.Media.Media3D.SpotLight();   break; 
                case KnownElements.StackPanel: o = new System.Windows.Controls.StackPanel();   break; 
                case KnownElements.StaticExtension: o = new System.Windows.Markup.StaticExtension();   break;
                case KnownElements.StaticResourceExtension: o = new System.Windows.StaticResourceExtension();   break; 
                case KnownElements.StatusBar: o = new System.Windows.Controls.Primitives.StatusBar();   break;
                case KnownElements.StatusBarItem: o = new System.Windows.Controls.Primitives.StatusBarItem();   break;
                case KnownElements.StopStoryboard: o = new System.Windows.Media.Animation.StopStoryboard();   break;
                case KnownElements.Storyboard: o = new System.Windows.Media.Animation.Storyboard();   break; 
                case KnownElements.StreamGeometry: o = new System.Windows.Media.StreamGeometry();   break;
                case KnownElements.StreamResourceInfo: o = new System.Windows.Resources.StreamResourceInfo();   break; 
                case KnownElements.StringAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.StringAnimationUsingKeyFrames();   break; 
                case KnownElements.StringConverter: o = new System.ComponentModel.StringConverter();   break;
                case KnownElements.StringKeyFrameCollection: o = new System.Windows.Media.Animation.StringKeyFrameCollection();   break; 
                case KnownElements.StrokeCollection: o = new System.Windows.Ink.StrokeCollection();   break;
                case KnownElements.StrokeCollectionConverter: o = new System.Windows.StrokeCollectionConverter();   break;
                case KnownElements.Style: o = new System.Windows.Style();   break;
                case KnownElements.TabControl: o = new System.Windows.Controls.TabControl();   break; 
                case KnownElements.TabItem: o = new System.Windows.Controls.TabItem();   break;
                case KnownElements.TabPanel: o = new System.Windows.Controls.Primitives.TabPanel();   break; 
                case KnownElements.Table: o = new System.Windows.Documents.Table();   break; 
                case KnownElements.TableCell: o = new System.Windows.Documents.TableCell();   break;
                case KnownElements.TableColumn: o = new System.Windows.Documents.TableColumn();   break; 
                case KnownElements.TableRow: o = new System.Windows.Documents.TableRow();   break;
                case KnownElements.TableRowGroup: o = new System.Windows.Documents.TableRowGroup();   break;
                case KnownElements.TemplateBindingExpressionConverter: o = new System.Windows.TemplateBindingExpressionConverter();   break;
                case KnownElements.TemplateBindingExtension: o = new System.Windows.TemplateBindingExtension();   break; 
                case KnownElements.TemplateBindingExtensionConverter: o = new System.Windows.TemplateBindingExtensionConverter();   break;
                case KnownElements.TemplateKeyConverter: o = new System.Windows.Markup.TemplateKeyConverter();   break; 
                case KnownElements.TextBlock: o = new System.Windows.Controls.TextBlock();   break; 
                case KnownElements.TextBox: o = new System.Windows.Controls.TextBox();   break;
                case KnownElements.TextDecoration: o = new System.Windows.TextDecoration();   break; 
                case KnownElements.TextDecorationCollection: o = new System.Windows.TextDecorationCollection();   break;
                case KnownElements.TextDecorationCollectionConverter: o = new System.Windows.TextDecorationCollectionConverter();   break;
                case KnownElements.TextEffect: o = new System.Windows.Media.TextEffect();   break;
                case KnownElements.TextEffectCollection: o = new System.Windows.Media.TextEffectCollection();   break; 
                case KnownElements.ThemeDictionaryExtension: o = new System.Windows.ThemeDictionaryExtension();   break;
                case KnownElements.Thickness: o = new System.Windows.Thickness();   break; 
                case KnownElements.ThicknessAnimation: o = new System.Windows.Media.Animation.ThicknessAnimation();   break; 
                case KnownElements.ThicknessAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.ThicknessAnimationUsingKeyFrames();   break;
                case KnownElements.ThicknessConverter: o = new System.Windows.ThicknessConverter();   break; 
                case KnownElements.ThicknessKeyFrameCollection: o = new System.Windows.Media.Animation.ThicknessKeyFrameCollection();   break;
                case KnownElements.Thumb: o = new System.Windows.Controls.Primitives.Thumb();   break;
                case KnownElements.TickBar: o = new System.Windows.Controls.Primitives.TickBar();   break;
                case KnownElements.TiffBitmapEncoder: o = new System.Windows.Media.Imaging.TiffBitmapEncoder();   break; 
                case KnownElements.TimeSpanConverter: o = new System.ComponentModel.TimeSpanConverter();   break;
                case KnownElements.TimelineCollection: o = new System.Windows.Media.Animation.TimelineCollection();   break; 
                case KnownElements.ToggleButton: o = new System.Windows.Controls.Primitives.ToggleButton();   break; 
                case KnownElements.ToolBar: o = new System.Windows.Controls.ToolBar();   break;
                case KnownElements.ToolBarOverflowPanel: o = new System.Windows.Controls.Primitives.ToolBarOverflowPanel();   break; 
                case KnownElements.ToolBarPanel: o = new System.Windows.Controls.Primitives.ToolBarPanel();   break;
                case KnownElements.ToolBarTray: o = new System.Windows.Controls.ToolBarTray();   break;
                case KnownElements.ToolTip: o = new System.Windows.Controls.ToolTip();   break;
                case KnownElements.Track: o = new System.Windows.Controls.Primitives.Track();   break; 
                case KnownElements.Transform3DCollection: o = new System.Windows.Media.Media3D.Transform3DCollection();   break;
                case KnownElements.Transform3DGroup: o = new System.Windows.Media.Media3D.Transform3DGroup();   break; 
                case KnownElements.TransformCollection: o = new System.Windows.Media.TransformCollection();   break; 
                case KnownElements.TransformConverter: o = new System.Windows.Media.TransformConverter();   break;
                case KnownElements.TransformGroup: o = new System.Windows.Media.TransformGroup();   break; 
                case KnownElements.TransformedBitmap: o = new System.Windows.Media.Imaging.TransformedBitmap();   break;
                case KnownElements.TranslateTransform: o = new System.Windows.Media.TranslateTransform();   break;
                case KnownElements.TranslateTransform3D: o = new System.Windows.Media.Media3D.TranslateTransform3D();   break;
                case KnownElements.TreeView: o = new System.Windows.Controls.TreeView();   break; 
                case KnownElements.TreeViewItem: o = new System.Windows.Controls.TreeViewItem();   break;
                case KnownElements.Trigger: o = new System.Windows.Trigger();   break; 
                case KnownElements.TypeExtension: o = new System.Windows.Markup.TypeExtension();   break; 
                case KnownElements.TypeTypeConverter: o = new System.Windows.Markup.TypeTypeConverter();   break;
                case KnownElements.UIElement: o = new System.Windows.UIElement();   break; 
                case KnownElements.UInt16Converter: o = new System.ComponentModel.UInt16Converter();   break;
                case KnownElements.UInt32Converter: o = new System.ComponentModel.UInt32Converter();   break;
                case KnownElements.UInt64Converter: o = new System.ComponentModel.UInt64Converter();   break;
                case KnownElements.UShortIListConverter: o = new System.Windows.Media.Converters.UShortIListConverter();   break; 
                case KnownElements.Underline: o = new System.Windows.Documents.Underline();   break;
                case KnownElements.UniformGrid: o = new System.Windows.Controls.Primitives.UniformGrid();   break; 
                case KnownElements.UriTypeConverter: o = new System.UriTypeConverter();   break; 
                case KnownElements.UserControl: o = new System.Windows.Controls.UserControl();   break;
                case KnownElements.Vector: o = new System.Windows.Vector();   break; 
                case KnownElements.Vector3D: o = new System.Windows.Media.Media3D.Vector3D();   break;
                case KnownElements.Vector3DAnimation: o = new System.Windows.Media.Animation.Vector3DAnimation();   break;
                case KnownElements.Vector3DAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.Vector3DAnimationUsingKeyFrames();   break;
                case KnownElements.Vector3DCollection: o = new System.Windows.Media.Media3D.Vector3DCollection();   break; 
                case KnownElements.Vector3DCollectionConverter: o = new System.Windows.Media.Media3D.Vector3DCollectionConverter();   break;
                case KnownElements.Vector3DConverter: o = new System.Windows.Media.Media3D.Vector3DConverter();   break; 
                case KnownElements.Vector3DKeyFrameCollection: o = new System.Windows.Media.Animation.Vector3DKeyFrameCollection();   break; 
                case KnownElements.VectorAnimation: o = new System.Windows.Media.Animation.VectorAnimation();   break;
                case KnownElements.VectorAnimationUsingKeyFrames: o = new System.Windows.Media.Animation.VectorAnimationUsingKeyFrames();   break; 
                case KnownElements.VectorCollection: o = new System.Windows.Media.VectorCollection();   break;
                case KnownElements.VectorCollectionConverter: o = new System.Windows.Media.VectorCollectionConverter();   break;
                case KnownElements.VectorConverter: o = new System.Windows.VectorConverter();   break;
                case KnownElements.VectorKeyFrameCollection: o = new System.Windows.Media.Animation.VectorKeyFrameCollection();   break; 
                case KnownElements.VideoDrawing: o = new System.Windows.Media.VideoDrawing();   break;
                case KnownElements.Viewbox: o = new System.Windows.Controls.Viewbox();   break; 
                case KnownElements.Viewport3D: o = new System.Windows.Controls.Viewport3D();   break; 
                case KnownElements.Viewport3DVisual: o = new System.Windows.Media.Media3D.Viewport3DVisual();   break;
                case KnownElements.VirtualizingStackPanel: o = new System.Windows.Controls.VirtualizingStackPanel();   break; 
                case KnownElements.VisualBrush: o = new System.Windows.Media.VisualBrush();   break;
                case KnownElements.Window: o = new System.Windows.Window();   break;
                case KnownElements.WmpBitmapEncoder: o = new System.Windows.Media.Imaging.WmpBitmapEncoder();   break;
                case KnownElements.WrapPanel: o = new System.Windows.Controls.WrapPanel();   break; 
                case KnownElements.XamlBrushSerializer: o = new System.Windows.Markup.XamlBrushSerializer();   break;
                case KnownElements.XamlInt32CollectionSerializer: o = new System.Windows.Markup.XamlInt32CollectionSerializer();   break; 
                case KnownElements.XamlPathDataSerializer: o = new System.Windows.Markup.XamlPathDataSerializer();   break; 
                case KnownElements.XamlPoint3DCollectionSerializer: o = new System.Windows.Markup.XamlPoint3DCollectionSerializer();   break;
                case KnownElements.XamlPointCollectionSerializer: o = new System.Windows.Markup.XamlPointCollectionSerializer();   break; 
                case KnownElements.XamlStyleSerializer: o = new System.Windows.Markup.XamlStyleSerializer();   break;
                case KnownElements.XamlTemplateSerializer: o = new System.Windows.Markup.XamlTemplateSerializer();   break;
                case KnownElements.XamlVector3DCollectionSerializer: o = new System.Windows.Markup.XamlVector3DCollectionSerializer();   break;
                case KnownElements.XmlDataProvider: o = new System.Windows.Data.XmlDataProvider();   break; 
                case KnownElements.XmlLanguageConverter: o = new System.Windows.Markup.XmlLanguageConverter();   break;
                case KnownElements.XmlNamespaceMapping: o = new System.Windows.Data.XmlNamespaceMapping();   break; 
                case KnownElements.ZoomPercentageConverter: o = new System.Windows.Documents.ZoomPercentageConverter();   break; 
            }
            return o; 
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            startArrow     = (Arrow)GetTemplateChild("StartArrow");
            endArrow       = (Arrow)GetTemplateChild("EndArrow");
            stopColorPanel = (System.Windows.Shapes.Rectangle)GetTemplateChild("StopColorPanel");
            alphaNumeric   = (Numeric)GetTemplateChild("nA");
            stopAnglePanel = (System.Windows.Shapes.Ellipse)GetTemplateChild("StopAnglePanel");
            stopAngleArrow = (System.Windows.Shapes.Line)GetTemplateChild("StopAngleArrow");
            SelectedBrush.PropertyChanged += new PropertyChangedEventHandler(SelectedBrush_PropertyChanged);

            alphaNumeric.ValueChanged += new RoutedEventHandler(alphaNumeric_ValueChanged);

            stopColorPanel.MouseLeftButtonUp += new MouseButtonEventHandler(ArrowDoubleClick);
            startArrow.MouseDoubleClick      += new MouseButtonEventHandler(ArrowDoubleClick);
            endArrow.MouseDoubleClick        += new MouseButtonEventHandler(ArrowDoubleClick);

            startArrow.MouseLeftButtonUp += new MouseButtonEventHandler(ArrowMouseUp);
            endArrow.MouseLeftButtonUp   += new MouseButtonEventHandler(ArrowMouseUp);

            stopAnglePanel.MouseDown += new MouseButtonEventHandler(Ellipse_MouseDown);
            stopAnglePanel.MouseMove += new MouseEventHandler(Ellipse_MouseMove);

            stopColorPanel.Fill = DrawingColorToBrushConverter.Convert(SelectedBrush.StartColor);
            alphaNumeric.Value  = SelectedBrush.StartColor.A;
            stopType            = StopType.Start;

            FillAngleArrow();
            //SetPreviewImage();
        }
Exemple #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="key">Unique key for line study</param>
 /// <param name="stroke">Stroke brush</param>
 /// <param name="chartPanel">Reference to chart panel where it will be placed.</param>
 public Ellipse(string key, Brush stroke, ChartPanel chartPanel)
     : base(key, stroke, chartPanel)
 {
     _studyType             = StudyTypeEnum.Ellipse;
     _ellipse               = new System.Windows.Shapes.Ellipse();
     _internalObjectCreated = true;
 }
        public override Stroke draw(Point anchor, Point cursor)
        {
            var circle = new System.Windows.Shapes.Ellipse();

            //Stroke stroke = circle.StrokeEndLineCap;
            throw new NotImplementedException();
        }
        private void initLine(Color c, LinkHeadType headType)
        {
            line            = new ArrowLine();
            line.ArrowAngle = 40;
            line.Stroke     = new SolidColorBrush(c);
            switch (headType)
            {
            case LinkHeadType.DoubleHeaded:
                line.ArrowEnds = ArrowEnds.Both;
                break;

            case LinkHeadType.SingleHeaded:
                line.ArrowEnds = ArrowEnds.End;
                break;

            default:
                throw new NotSupportedException();
            }
            line.StrokeThickness = ShapeUtils.LINE_WIDTH;
            line.Effect          = ShapeUtils.ShadowProvider();
            line.Tag             = this;

            selMarker1     = ShapeUtils.MakeLinkEnd();
            selMarker1.Tag = this;

            selMarker2     = ShapeUtils.MakeLinkEnd();
            selMarker2.Tag = this;

            line.MouseWheel += MouseWheel;
        }
Exemple #6
0
        /// <summary>
        /// Changes the Fill property of the control.
        /// </summary>
        /// <param name="targetControl">The control instance.</param>
        /// <param name="fromValue">The color to change to before the transition begins./param>
        /// <param name="toValue">The color to change to.</param>
        /// <param name="duration">Transtition Time in Milliseconds.</param>
        public static void Fill(System.Windows.Shapes.Ellipse targetControl, Color fromValue, Color toValue, int duration)
        {
            ColorAnimation animation = new ColorAnimation(toValue, new Duration(TimeSpan.FromMilliseconds(duration)));

            targetControl.Fill = new SolidColorBrush(fromValue);
            targetControl.Fill.BeginAnimation(SolidColorBrush.ColorProperty, animation);
        }
Exemple #7
0
        /// <summary>
        /// Changes the Stroke property of the control.
        /// </summary>
        /// <param name="targetControl">The control instance.</param>
        /// <param name="toValue">The color to change to.</param>
        /// <param name="duration">Transtition Time in Milliseconds.</param>
        public static void Stroke(System.Windows.Shapes.Ellipse targetControl, Color toValue, int duration)
        {
            ColorAnimation animation = new ColorAnimation(toValue, new Duration(TimeSpan.FromMilliseconds(duration)));

            targetControl.Stroke = new SolidColorBrush(((SolidColorBrush)targetControl.Stroke).Color);
            targetControl.Stroke.BeginAnimation(SolidColorBrush.ColorProperty, animation);
        }
Exemple #8
0
        public override void Draw(double x, double y)
        {
            if (IsAdornmentVisible)
            {
                Cleanup();
            }

            EditorInstance.VisualElement.Dispatcher.Invoke(() =>
            {
                var adornment = new System.Windows.Shapes.Ellipse
                {
                    Width           = _width,
                    Height          = _height,
                    Fill            = _color,
                    Stroke          = System.Windows.Media.Brushes.Black,
                    Opacity         = 0.6,
                    StrokeThickness = 1
                };

                Canvas.SetLeft(adornment, x - adornment.Width / 2);
                Canvas.SetTop(adornment, y - adornment.Height / 2);

                PutLiveAdornment(adornment);
            });
        }
Exemple #9
0
        public static FrameworkElement GetColorTextbox(Blueprint blueprint, EventHandler StateChangeHandler)
        {
            StackPanel stackPanel = GetLabeledStackPanel(blueprint.UIAttribute);

            try
            {
                DynamicColorTextBox textBox = new DynamicColorTextBox(blueprint);
                textBox.Margin = new Thickness(0, 3, 0, 0);

                textBox.HookStateChangedEvents(StateChangeHandler);
                stackPanel.Children.Add(textBox);

                System.Windows.Shapes.Ellipse shape = new System.Windows.Shapes.Ellipse()
                {
                    Width = 22, Height = 22, Margin = new Thickness(4, 2, 0, 0)
                };
                textBox.SwatchShape = shape;
                stackPanel.Children.Add(shape);
            }
            catch (Exception ex)
            {
                AddExceptionDetail(stackPanel, ex);
            }

            return(stackPanel);
        }
Exemple #10
0
        private static void HandleMessage(string MessageString)
        {
            string Sender  = AuxiliaryClientWorker.GetElement(MessageString, "-U ", " -Content");
            string Message = AuxiliaryClientWorker.GetElement(MessageString, "-Content ", ".");

            MainWindowController.MainWindow.Dispatcher.Invoke(() =>
            {
                #region Profile picture before the text
                System.Windows.Shapes.Ellipse ImageToShowFrame = new System.Windows.Shapes.Ellipse();
                ImageToShowFrame.Height               = 30;
                ImageToShowFrame.Width                = 30;
                ImageToShowFrame.Stroke               = System.Windows.Media.Brushes.Black;
                ImageToShowFrame.StrokeThickness      = 1.5;
                ImageBrush ImageToShowBrush           = new ImageBrush(AuxiliaryClientWorker.BitmapToBitmapImage(ProfilePictures[Usernames.IndexOf(Sender)]));
                ImageToShowFrame.Fill                 = ImageToShowBrush;
                ImageToShowFrame.MouseLeftButtonDown += This;
                #endregion
                MainWindowController.ChatParagraph.Inlines.Add(ImageToShowFrame);

                #region Text to add after the profile picture
                System.Windows.Controls.Label TextToShow = new System.Windows.Controls.Label();
                TextToShow.FontSize   = 16;
                TextToShow.Foreground = System.Windows.Media.Brushes.Black;
                TextToShow.Content    = "[" + Sender + "]: " + Message;
                #endregion
                MainWindowController.ChatParagraph.Inlines.Add(TextToShow);
                MainWindowController.ChatParagraph.Inlines.Add(Environment.NewLine);
                MainWindowController.ChatDocument.Blocks.Add(MainWindowController.ChatParagraph);
                MainWindowController.MainPage.ClientChatTextBox.Document = MainWindowController.ChatDocument;
            });
        }
        internal override void DrawLineStudy(Types.RectEx rect, LineStatus lineStatus)
        {
            rect.Normalize();

            if (lineStatus == LineStatus.StartPaint)
            {
                _internalObjectCreated = true;

                for (int i = 0; i < _ellipses.Length; i++)
                {
                    _ellipses[i] =
                        new System.Windows.Shapes.Ellipse
                    {
                        Tag             = this,
                        Stroke          = Stroke,
                        StrokeThickness = StrokeThickness,
                        Fill            = Brushes.Transparent
                    };
                    C.Children.Add(_ellipses[i]);
                }

                new ContextLine(this);

                _chartX.InvokeLineStudyCreated(new StockChartX.LineStudyCreatedEventArgs(this));

                return;
            }

            double elSize = Math.Max(rect.Width, rect.Height);

            Rect rc = new Rect(rect.Left, rect.Top, elSize, elSize);

            for (int i = 0; i < _ellipses.Length; i++)
            {
                if (rc.IsEmpty)
                {
                    break;
                }
#if SILVERLIGHT
                rc.X      -= -elSize * 0.1;
                rc.Y      -= -elSize * 0.1;
                rc.Width  += 2 * (-elSize * 0.1);
                rc.Height += 2 * (-elSize * 0.1);
#endif
                Canvas.SetLeft(_ellipses[i], rc.Left);
                Canvas.SetTop(_ellipses[i], rc.Top);
                _ellipses[i].Height = rc.Width;
                _ellipses[i].Width  = rc.Height;
#if WPF
                rc.Inflate(-elSize * 0.1, -elSize * 0.1);
#endif
            }

            foreach (System.Windows.Shapes.Ellipse ellipse in _ellipses)
            {
                Canvas.SetZIndex(ellipse, ZIndexConstants.LineStudies1);
            }
        }
Exemple #12
0
        internal static FlowDocument SortFriendsList()
        {
            FlowDocument DocumentToReturn = new FlowDocument();
            Paragraph    CurrentParagraph = new Paragraph();

            #region Online status ellipse
            System.Windows.Shapes.Ellipse OnlineStatus = new System.Windows.Shapes.Ellipse();
            OnlineStatus.Height          = 30;
            OnlineStatus.Width           = 30;
            OnlineStatus.Stroke          = Brushes.Black;
            OnlineStatus.StrokeThickness = 1.5;
            OnlineStatus.Fill            = Brushes.Green;
            #endregion
            #region Offline status ellipse
            System.Windows.Shapes.Ellipse OfflineStatus = new System.Windows.Shapes.Ellipse();
            OfflineStatus.Height          = 30;
            OfflineStatus.Width           = 30;
            OfflineStatus.Stroke          = Brushes.Black;
            OfflineStatus.StrokeThickness = 1.5;
            OfflineStatus.Fill            = Brushes.Red;
            #endregion

            if (MainClientWorker.CurrentFriendsList.Count == 0)
            {
                Label TextToShow = new Label();
                TextToShow.FontSize   = 16;
                TextToShow.Foreground = Brushes.Black;
                TextToShow.Content    = "Uh oh... It looks like you have no friends for now :(";
                CurrentParagraph.Inlines.Add(TextToShow);
                CurrentParagraph.Inlines.Add(Environment.NewLine);
                DocumentToReturn.Blocks.Add(CurrentParagraph);
                return(DocumentToReturn);
            }
            else
            {
                foreach (string Friend in MainClientWorker.CurrentFriendsList)
                {
                    if (MainClientWorker.CurrentOnlineUsers.Contains(Friend))
                    {
                        CurrentParagraph.Inlines.Add(OnlineStatus);
                    }
                    else
                    {
                        CurrentParagraph.Inlines.Add(OfflineStatus);
                    }
                    #region Text to add after status ellipse
                    Label TextToShow = new Label();
                    TextToShow.FontSize   = 16;
                    TextToShow.Foreground = Brushes.Black;
                    TextToShow.Content    = Friend;
                    #endregion
                    CurrentParagraph.Inlines.Add(TextToShow);
                    CurrentParagraph.Inlines.Add(Environment.NewLine);
                    DocumentToReturn.Blocks.Add(CurrentParagraph);
                }
                return(DocumentToReturn);
            }
        }
Exemple #13
0
 public static void markcell(Geometry.Vector p)
 {
     System.Windows.Shapes.Ellipse ell = new System.Windows.Shapes.Ellipse {
         Width = spotsize, Height = spotsize, Fill = new SolidColorBrush(spotcolor)
     };
     System.Windows.Controls.Canvas.SetLeft(ell, p.X - spotsize / 2);
     System.Windows.Controls.Canvas.SetTop(ell, p.Y - spotsize / 2);
     MapControl.Current.MarkLayer.Children.Add(ell);
 }
Exemple #14
0
        private void CheckImage(bool ischeck)
        {
            if (ischeck)
            {
                // simple visual definition
                var grid = new Grid {
                    Width = 22, Height = 22
                };

                System.Windows.Shapes.Ellipse ell1 = new System.Windows.Shapes.Ellipse();
                ell1.Width  = 22;
                ell1.Height = 22;
                ell1.Fill   = Brushes.White;

                System.Windows.Shapes.Ellipse ell2 = new System.Windows.Shapes.Ellipse();
                ell2.Width  = 20;
                ell2.Height = 20;

                SolidColorBrush br1 = new SolidColorBrush();
                br1.Color = Color.FromArgb(255, 0x49, 0xA9, 0);

                ell2.Fill = br1;

                TextBlock tb = new TextBlock();
                tb.Text                = m_num.ToString();
                tb.Foreground          = Brushes.White;
                tb.FontWeight          = FontWeights.Bold;
                tb.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                tb.VerticalAlignment   = System.Windows.VerticalAlignment.Center;

                grid.Children.Add(ell1);
                grid.Children.Add(ell2);
                grid.Children.Add(tb);

                grid.Measure(new Size(grid.Width, grid.Height));
                grid.Arrange(new Rect(new Size(grid.Width, grid.Height)));

                // create a BitmapSource from the visual
                var rtb = new RenderTargetBitmap(
                    (int)grid.Width,
                    (int)grid.Height,
                    96,
                    96,
                    PixelFormats.Pbgra32);
                rtb.Render(grid);

                imgMark.Source = rtb;
            }
            else
            {
                BitmapImage bi3 = new BitmapImage();
                bi3.BeginInit();
                bi3.UriSource = new Uri("Images/close.png", UriKind.Relative);
                bi3.EndInit();
                imgMark.Source = bi3;
            }
        }
 /// <summary>
 /// Creates the transparent "internal" circle
 /// </summary>
 /// <returns></returns>
 private System.Windows.Shapes.Shape Internal()
 {
     System.Windows.Shapes.Ellipse Circle = new System.Windows.Shapes.Ellipse();
     Circle.Height          = HEIGHT;
     Circle.Width           = WIDTH;
     Circle.Fill            = Brushes.Yellow;
     Circle.Stroke          = Brushes.Black;
     Circle.StrokeThickness = 1;
     return(Circle);
 }
Exemple #16
0
 public override void OnMouseDown(Object sender, MouseEventArgs e)
 {
     isDrawig              = true;
     ellipse               = new Ellipse(new Point(e.GetPosition(canvas).X, e.GetPosition(canvas).Y), new Point(e.GetPosition(canvas).X, e.GetPosition(canvas).Y));
     ellipseForDraw        = new System.Windows.Shapes.Ellipse();
     ellipseForDraw.Stroke = Brushes.Red;
     ellipseForDraw.SetValue(Canvas.TopProperty, ellipse.GetFirstPoint().getY());
     ellipseForDraw.SetValue(Canvas.LeftProperty, ellipse.GetFirstPoint().getX());
     canvas.Children.Add(ellipseForDraw);
 }
Exemple #17
0
 public override UIElement Draw()
 {
     System.Windows.Shapes.Ellipse ellipse = new System.Windows.Shapes.Ellipse();
     ellipse.Width  = this.Width;
     ellipse.Height = this.Heigth;
     ellipse.Stroke = new SolidColorBrush(Colors.Black);
     ellipse.Fill   = new SolidColorBrush(Colors.Transparent);
     System.Windows.Controls.Canvas.SetLeft(ellipse, this.Left);
     System.Windows.Controls.Canvas.SetTop(ellipse, this.Top);
     return((UIElement)ellipse);
 }
        //Generarea elipselor pe canvas si adaugarea lor intr-o lista de elipse pentru stergerea lor ulterioara
        private void AddEllipse(System.Windows.Shapes.Ellipse ellipse)
        {
            ellipse.Stroke          = new SolidColorBrush(Colors.Orange);
            ellipse.StrokeThickness = 2;
            ellipse.Width           = 5;
            ellipse.Fill            = new SolidColorBrush(Colors.Orange);
            mainCanvas.Children.Add(ellipse);

            allEllipses.Add(ellipse);
            lastEllipse = ellipse;
        }
Exemple #19
0
 public static System.Windows.Shapes.Ellipse MakeLinkEnd()
 {
     System.Windows.Shapes.Ellipse rect = new System.Windows.Shapes.Ellipse();
     rect.Width           = LINK_END_SZ;
     rect.Height          = LINK_END_SZ;
     rect.Stroke          = System.Windows.Media.Brushes.Blue;
     rect.Fill            = System.Windows.Media.Brushes.Blue;
     rect.Opacity         = 0.3;
     rect.StrokeThickness = 2;
     return(rect);
 }
Exemple #20
0
 public Runway(double mx, double my, double mwidth, double mheight, int id, System.Windows.Shapes.Ellipse ellipse)
 {
     mTimer = 0;
     ID = id;
     x = mx;
     y = my;
     width = mwidth;
     height = mheight;
     occupied = false;
     redSign = ellipse;
 }
Exemple #21
0
		/*Draw Circle*/
		public static void DrawCircle(Circle xCircle, Canvas mainCanvas)
		{
			System.Windows.Shapes.Ellipse wCircle = new System.Windows.Shapes.Ellipse();
			wCircle.Width = xCircle.Radius * 2;
			wCircle.Height = xCircle.Radius * 2;
			getMaxPt(xCircle.Center.X+xCircle.Radius,xCircle.Center.Y+xCircle.Radius);
			getMaxPt(xCircle.Center.X-xCircle.Radius,xCircle.Center.Y-xCircle.Radius);
			Canvas.SetLeft(wCircle, xCircle.Center.X - xCircle.Radius);
			Canvas.SetTop(wCircle, mainCanvas.Height - (xCircle.Center.Y + xCircle.Radius));
			TypeConverter.Entity2Shape(xCircle, wCircle);
			mainCanvas.Children.Add(wCircle);
		}
Exemple #22
0
		/*Draw Ellipse*/
		public static void DrawEllipse(Ellipse xEllipse, Canvas mainCanvas)
		{
			System.Windows.Shapes.Ellipse wEllipse = new System.Windows.Shapes.Ellipse();
			wEllipse.Width = xEllipse.MajorAxis;
			wEllipse.Height = xEllipse.MinorAxis;
			getMaxPt(xEllipse.Center.X+xEllipse.MajorAxis / 2,xEllipse.Center.Y+xEllipse.MinorAxis / 2);
			getMaxPt(xEllipse.Center.X-xEllipse.MajorAxis / 2,xEllipse.Center.Y-xEllipse.MinorAxis / 2);
			Canvas.SetLeft(wEllipse, xEllipse.Center.X - xEllipse.MajorAxis / 2);
			Canvas.SetTop(wEllipse, mainCanvas.Height - (xEllipse.Center.Y + xEllipse.MinorAxis / 2));
			TypeConverter.Entity2Shape(xEllipse, wEllipse);
			mainCanvas.Children.Add(wEllipse);
		}
        public void CreateAnEllipse(System.Windows.Shapes.Ellipse ellipse)
        {
            ellipse = new System.Windows.Shapes.Ellipse();

            //SolidColorBrush blueBrush = new SolidColorBrush();
            //blueBrush.Color = Colors.Blue;
            //SolidColorBrush blackBrush = new SolidColorBrush();
            //blackBrush.Color = Colors.Black;
            //ellipse.StrokeThickness = 5;
            //ellipse.Stroke = blackBrush;
            //ellipse.Fill = blueBrush;
            //canvas.Children.Add(ellipse);
        }
Exemple #24
0
        private static void DrawPointMarker(this Canvas canvas, Vector2 point, Brush stroke, int strokeThickness)
        {
            var ellipse = new System.Windows.Shapes.Ellipse
            {
                Width           = WeightIndicatorDiameter,
                Height          = WeightIndicatorDiameter,
                Stroke          = stroke,
                StrokeThickness = strokeThickness
            };

            Canvas.SetLeft(ellipse, point.X - ellipse.Width / 2);
            Canvas.SetTop(ellipse, point.Y - ellipse.Height / 2);
            canvas.Children.Add(ellipse);
        }
        public override void Draw(Canvas canvas)
        {
            var ellipse = new System.Windows.Shapes.Ellipse()
            {
                Height          = Height,
                Width           = Width,
                Stroke          = Color,
                StrokeThickness = Thickness
            };

            Tag = ellipse.GetHashCode();
            StartPoint(ellipse, canvas);
            canvas.Children.Add(ellipse);
        }
Exemple #26
0
        public Circle(DataPoint bukalemunDataPoint, DataPoint pixelatedDataPoint)
        {
            this.bukalemunDataPoint = bukalemunDataPoint;
            this.pixelatedDataPoint = pixelatedDataPoint;

            Ellipse        = new System.Windows.Shapes.Ellipse();
            Ellipse.Height = 10;
            Ellipse.Width  = 10;
            double fromLeft = pixelatedDataPoint.X - Ellipse.Width / 2;
            double fromTop  = pixelatedDataPoint.Y - Ellipse.Height / 2;

            Ellipse.Margin = new System.Windows.Thickness(fromLeft, fromTop, 0, 0);
            Ellipse.Fill   = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.BlueViolet);
        }
Exemple #27
0
        public override void Draw(Canvas canvas)
        {
            System.Windows.Shapes.Ellipse ellipse = new System.Windows.Shapes.Ellipse
            {
                Fill   = new SolidColorBrush(FigureColor),
                Stroke = new SolidColorBrush(LineColor),
                Width  = Math.Max(Width, Height),
                Height = Math.Max(Width, Height)
            };
            Canvas.SetTop(ellipse, Top);
            Canvas.SetLeft(ellipse, Left);

            canvas.Children.Add(ellipse);
        }
        /// <summary>
        /// This is the method used to remove the Marker for the current player
        /// </summary>
        private void removeMarker()
        {
            String s = "pos";

            for (int i = 0; i < 40; i++)
            {
                var label = (System.Windows.Shapes.Ellipse) this.FindName((s + i.ToString()));

                if (i == currentPlayer.getPosition())
                {
                    System.Windows.Shapes.Ellipse l = (System.Windows.Shapes.Ellipse)label;
                    l.Fill = System.Windows.Media.Brushes.White;
                }
            }
        }
Exemple #29
0
        List <Point> CreatePointListFromRectMask(System.Windows.Shapes.Rectangle rect)
        {
            List <Point> pList = new List <Point>();

            if (rect == null)
            {
                return(pList);
            }
            List <Point> refList = _xyzAxesVM.GetPositionList();
            Point        refP    = refList[0];

            pList.Add(refP);
            Tuple <System.Windows.Shapes.Ellipse, System.Windows.Controls.TextBlock, Point> refTuple = new Tuple <System.Windows.Shapes.Ellipse, System.Windows.Controls.TextBlock, Point>(null, null, refP);

            MarkerList.Add(refTuple);

            double xStepInPixel = GlobalVariables.motorSettings.XStep * GlobalVariables.motorSettings.XPixelInMM;
            double yStepInPixel = GlobalVariables.motorSettings.YStep * GlobalVariables.motorSettings.YPixelInMM;

            double x = System.Windows.Controls.Canvas.GetLeft(rect);
            double y = System.Windows.Controls.Canvas.GetTop(rect);
            int    w = (int)(rect.Width / xStepInPixel) + 1;
            int    h = (int)(rect.Height / yStepInPixel) + 1;

            MainWindow mv = Application.Current.Windows.OfType <MainWindow>().FirstOrDefault();

            for (int i = 0; i < h; i++)
            {
                double Y = y + i * xStepInPixel;
                for (int j = 0; j < w; j++)
                {
                    double X = x + j * yStepInPixel;
                    Point  p = new Point(X, Y);
                    pList.Add(p);

                    System.Windows.Shapes.Ellipse e = DrawCanvas.Circle(X, Y, 15, 15, false, mv.CanvasDraw);
                    tempEllipseList.Add(e);

                    string s = MarkerList.Count.ToString();
                    System.Windows.Controls.TextBlock t = DrawCanvas.Text(X, Y, s, false, null, mv.CanvasDraw);
                    tempTBList.Add(t);

                    Tuple <System.Windows.Shapes.Ellipse, System.Windows.Controls.TextBlock, Point> tuple = new Tuple <System.Windows.Shapes.Ellipse, System.Windows.Controls.TextBlock, Point>(e, t, p);
                    MarkerList.Add(tuple);
                }
            }
            return(pList);
        }
        public override void Draw(Canvas canvas)
        {
            System.Windows.Shapes.Ellipse ellipse = new System.Windows.Shapes.Ellipse()
            {
                Height          = height,
                Width           = width,
                Stroke          = color,
                StrokeThickness = thickness
            };

            var point = StartPoint();

            Canvas.SetLeft(ellipse, point.Item1);
            Canvas.SetTop(ellipse, point.Item2);
            canvas.Children.Add(ellipse);
        }
Exemple #31
0
        void UpdateMarker()
        {
            View.PhosResultsWindow mw = (View.PhosResultsWindow)Application.Current.Windows.OfType <Window>().Last();
            mw.CanvasResult.Children.Clear();

            Tuple <System.Windows.Shapes.Ellipse, TextBlock, Point> t = MarkerList[(int)CurrentListItem];
            string saved = XamlWriter.Save(t.Item1);

            System.Windows.Shapes.Ellipse ellipse = (System.Windows.Shapes.Ellipse)XamlReader.Load(XmlReader.Create(new StringReader(saved)));
            ellipse.Width  *= CurrentListItem == 0 ? 1 : 2;
            ellipse.Height *= CurrentListItem == 0 ? 1 : 2;
            ellipse.SetValue(Canvas.LeftProperty, t.Item3.X - ellipse.Width / 2.0);
            ellipse.SetValue(Canvas.TopProperty, t.Item3.Y - ellipse.Height / 2.0);

            mw.CanvasResult.Children.Add(ellipse);
        }
Exemple #32
0
        public void RefreshEvents()
        {
            viewport_canvas.Children.Clear();
            viewport_canvas.Children.Add(Editor.selSquare);
            viewport_canvas.Children.Add(label_mgraphic);
            foreach (Event e in Editor.activeTypeGroup.events)
            {
                if (e.inLevel)
                {
                    var ev   = new System.Windows.Shapes.Ellipse();
                    int size = 9;
                    ev.Width  = size;
                    ev.Height = size;
                    ev.Margin = new Thickness(e.position.X - 4, e.position.Y - 4, 0, 0);

                    if (!e.selected)
                    {
                        ev.Stroke = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 231, 148));
                    }
                    else
                    {
                        ev.Stroke = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 100, 255));
                    }

                    ev.StrokeThickness = 2;

                    viewport_canvas.Children.Add(ev);


                    var lab = new System.Windows.Controls.TextBlock();
                    lab.Text   = string.Format("{0}  {1}  {2}", e.ID.ToString("000"), e.type.ToString(), ((byte)e.type).ToString("X2"));
                    lab.Margin = new Thickness(e.position.X + 8, e.position.Y - 6, e.position.X + 100, e.position.Y + 15);
                    if (!e.selected)
                    {
                        lab.Foreground = new SolidColorBrush(System.Windows.Media.Color.FromArgb(100, 255, 231, 148));
                        lab.Background = new SolidColorBrush(System.Windows.Media.Color.FromArgb(100, 0, 0, 0));
                    }
                    else
                    {
                        lab.Foreground = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 100, 255));
                        lab.Background = new SolidColorBrush(System.Windows.Media.Color.FromArgb(200, 0, 0, 0));
                    }
                    lab.FontSize = 9;
                    viewport_canvas.Children.Add(lab);
                }
            }
        }
 public void SetSourcePortForEdgeRouting(Point portLocation) {
     _sourcePortLocationForEdgeRouting = portLocation;
     if (_sourcePortCircle == null) {
         _sourcePortCircle = CreatePortPath();
         GraphCanvasChildrenAdd(_sourcePortCircle);
     }
     _sourcePortCircle.Width = _sourcePortCircle.Height = UnderlyingPolylineCircleRadius;
     _sourcePortCircle.StrokeThickness = _sourcePortCircle.Width/10;
     Common.PositionFrameworkElement(_sourcePortCircle, portLocation, 1);
 }
Exemple #34
0
        private void initLine(Color c, LinkHeadType headType)
        {
            line = new ArrowLine();
            line.ArrowAngle = 40;
            line.Stroke = new SolidColorBrush(c);
            switch (headType)
            {
                case LinkHeadType.DoubleHeaded:
                    line.ArrowEnds = ArrowEnds.Both;
                    break;
                case LinkHeadType.SingleHeaded:
                    line.ArrowEnds = ArrowEnds.End;
                    break;
                default:
                    throw new NotSupportedException();
            }
            line.StrokeThickness = ShapeUtils.LINE_WIDTH;
            line.Effect = ShapeUtils.ShadowProvider();
            line.Tag = this;

            selMarker1 = ShapeUtils.MakeLinkEnd();
            selMarker1.Tag = this;

            selMarker2 = ShapeUtils.MakeLinkEnd();
            selMarker2.Tag = this;

            line.MouseWheel += MouseWheel;
        }
        /// <summary>
        /// Draws an ellipse
        /// </summary>
        /// <param name="frame"></param>
        /// <param name="pen"></param>
        /// <param name="brush"></param>
        public void DrawEllipse(Rect frame, Pen pen = null, NGraphics.Brush brush = null)
        {
            var ellipseEl = new System.Windows.Shapes.Ellipse();
            var offset = pen != null ? pen.Width : 0.0;

            ellipseEl.Width = frame.Width + offset;
            ellipseEl.Height = frame.Height + offset;

            if (brush != null)
                ellipseEl.Fill = GetBrush(brush);

            if (pen != null)
            {
                ellipseEl.Stroke = GetStroke(pen);
                ellipseEl.StrokeThickness = pen.Width;
            }

            ellipseEl.RenderTransform = Conversions.GetTransform(CurrentTransform);
            _canvas.Children.Add(ellipseEl);
            Canvas.SetLeft(ellipseEl, frame.X - offset / 2.0);
            Canvas.SetTop(ellipseEl, frame.Y - offset / 2.0);
        }
Exemple #36
0
        public dynKinect()
        {
            InPortData.Add(new PortData(null, "tim", "How often to receive updates.", typeof(dynTimer)));
            InPortData.Add(new PortData(null, "X scale", "The amount to scale the skeletal measurements in the X direction.", typeof(dynDouble)));
            InPortData.Add(new PortData(null, "Y scale", "The amount to scale the skeletal measurements in the Y direction.", typeof(dynDouble)));
            InPortData.Add(new PortData(null, "Z scale", "The amount to scale the skeletal measurements in the Z direction.", typeof(dynDouble)));

            OutPortData.Add(new PortData(null, "Hand", "Reference point representing hand location", typeof(dynReferencePoint)));
            OutPortData[0].Object = this.Tree;

            image1 = new Image();
            image1.Width = 320;
            image1.Height = 240;
            image1.Margin = new Thickness(5);
            image1.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            image1.Name = "image1";
            image1.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            //image1.Margin = new Thickness(0, 0, 0, 0);

            Canvas trackingCanvas = new Canvas();
            trackingCanvas.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
            trackingCanvas.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;

            //add an ellipse to track the hand
            rightHandEllipse = new System.Windows.Shapes.Ellipse();
            rightHandEllipse.Height = 10;
            rightHandEllipse.Width = 10;
            rightHandEllipse.Name = "rightHandEllipse";
            SolidColorBrush yellowBrush = new SolidColorBrush(System.Windows.Media.Colors.OrangeRed);
            rightHandEllipse.Fill = yellowBrush;

            this.inputGrid.Children.Add(image1);
            this.inputGrid.Children.Add(trackingCanvas);
            trackingCanvas.Children.Add(rightHandEllipse);

            base.RegisterInputsAndOutputs();

            this.Width = 450;
            this.Height = 240 + 5;

            this.Loaded += new RoutedEventHandler(topControl_Loaded);
        }
        private void computeClusters(int nb)
        {
            FileReader filereader = new FileReader("Data/data.txt");

            double[][] rawData = filereader.readfromtextfile();
            kmeans = new KMeansClustering(nb, rawData);

            List<List<double[]>> clusters = kmeans.getCalculatedClusters();

            System.Diagnostics.Debug.WriteLine(kmeans.displayResult());

            Microsoft.Phone.Maps.Controls.MapLayer points = new Microsoft.Phone.Maps.Controls.MapLayer();

            System.Windows.Media.Color[] colors = new System.Windows.Media.Color[10];

            colors[0] = System.Windows.Media.Colors.Blue;
            colors[1] = System.Windows.Media.Colors.Red;
            colors[2] = System.Windows.Media.Colors.Green;
            colors[3] = System.Windows.Media.Colors.Yellow;
            colors[4] = System.Windows.Media.Colors.Purple;
            colors[5] = System.Windows.Media.Colors.Orange;
            colors[6] = System.Windows.Media.Colors.Cyan;
            colors[7] = System.Windows.Media.Colors.DarkGray;
            colors[8] = System.Windows.Media.Colors.Magenta;
            colors[9] = System.Windows.Media.Colors.White;

            for (int j = 0; j < clusters.ToArray().Length; j++)
            {
                System.Diagnostics.Debug.WriteLine(j);
                // lire dans chacun des clusters
                for (int i = 0; i < clusters.ElementAt(j).ToArray().Length; i++)
                {
                    double[] data = clusters.ElementAt(j).ElementAt(i);

                    Microsoft.Phone.Maps.Controls.MapOverlay pointsdata = new Microsoft.Phone.Maps.Controls.MapOverlay();

                    System.Windows.Shapes.Ellipse test = new System.Windows.Shapes.Ellipse();

                    test.Fill = new System.Windows.Media.SolidColorBrush(colors[j % 10]);
                    test.Height = 6;
                    test.Width = 6;
                    test.Opacity = 75;

                    pointsdata.Content = test;

                    System.Device.Location.GeoCoordinate coord = new System.Device.Location.GeoCoordinate(data[0], data[1]);

                    pointsdata.GeoCoordinate = coord;

                    points.Add(pointsdata);
                }
            }

            carte.Layers.Clear();

            carte.Layers.Add(points);
        }
Exemple #38
0
        public dynKinect()
        {
            InPortData.Add(new PortData("exec", "Execution Interval", typeof(object)));
            InPortData.Add(new PortData("X scale", "The amount to scale the skeletal measurements in the X direction.", typeof(double)));
            InPortData.Add(new PortData("Y scale", "The amount to scale the skeletal measurements in the Y direction.", typeof(double)));
            InPortData.Add(new PortData("Z scale", "The amount to scale the skeletal measurements in the Z direction.", typeof(double)));
            OutPortData = new PortData("kinect data", "position data from the kinect", typeof(object));

            int width = 320;
            int height = 240;

            WriteableBitmap wbitmap = new WriteableBitmap(width, height, 96, 96, PixelFormats.Bgra32, null);

            // Create an array of pixels to contain pixel color values
            uint[] pixels = new uint[width * height];

            int red;
            int green;
            int blue;
            int alpha;

            for (int x = 0; x < width; ++x)
            {
                for (int y = 0; y < height; ++y)
                {
                    int i = width * y + x;

                    red = 0;
                    green = 255 * y / height;
                    blue = 255 * (width - x) / width;
                    alpha = 255;

                    pixels[i] = (uint)((blue << 24) + (green << 16) + (red << 8) + alpha);
                }
            }

            // apply pixels to bitmap
            wbitmap.WritePixels(new Int32Rect(0, 0, width, height), pixels, width * 4, 0);

            image1 = new Image();
            image1.Width = width;
            image1.Height = height;
            image1.Margin = new Thickness(5);
            image1.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            image1.Name = "image1";
            image1.VerticalAlignment = System.Windows.VerticalAlignment.Top;
            image1.Source = wbitmap;
            //image1.Margin = new Thickness(0, 0, 0, 0);

            Canvas trackingCanvas = new Canvas();
            trackingCanvas.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
            trackingCanvas.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;

            //add an ellipse to track the hand
            rightHandEllipse = new System.Windows.Shapes.Ellipse();
            rightHandEllipse.Height = 10;
            rightHandEllipse.Width = 10;
            rightHandEllipse.Name = "rightHandEllipse";
            SolidColorBrush yellowBrush = new SolidColorBrush(System.Windows.Media.Colors.OrangeRed);
            rightHandEllipse.Fill = yellowBrush;

            this.inputGrid.Children.Add(image1);
            this.inputGrid.Children.Add(trackingCanvas);
            trackingCanvas.Children.Add(rightHandEllipse);

            base.RegisterInputsAndOutputs();

            this.Width = width + 120;// 450;
            this.Height = height + 5;

            this.Loaded += new RoutedEventHandler(topControl_Loaded);
        }
Exemple #39
0
 public static System.Windows.Shapes.Ellipse MakeLinkEnd()
 {
     System.Windows.Shapes.Ellipse rect = new System.Windows.Shapes.Ellipse();
     rect.Width = LINK_END_SZ;
     rect.Height = LINK_END_SZ;
     rect.Stroke = System.Windows.Media.Brushes.Blue;
     rect.Fill = System.Windows.Media.Brushes.Blue;
     rect.Opacity = 0.3;
     rect.StrokeThickness = 2;
     return rect;
 }
 public void RemoveSourcePortEdgeRouting() {
     _graphCanvas.Children.Remove(_sourcePortCircle);
     _sourcePortCircle = null;
 }
		UIElement CreateGraphicsContainer(ExportGraphicContainer container)
		{
			IGraphicStyleDecorator decorator = container.StyleDecorator as IGraphicStyleDecorator;
			
			UIElement shape = null;
			var ss = decorator.Shape as EllipseShape;
			if (ss != null) {
				
				var circle  = new System.Windows.Shapes.Ellipse();
				SetDimension(circle,decorator);
				circle.Fill = ConvertBrush(decorator.BackColor);
				circle.StrokeThickness = decorator.Thickness;
				circle.Stroke = ConvertBrush(decorator.ForeColor);
				shape = circle;
			}
			else
			{
				RectangleShape rs = decorator.Shape as RectangleShape;
				var border = CreateBorder(decorator as BaseStyleDecorator,decorator.Thickness,rs.CornerRadius);
					
				border.BorderBrush = ConvertBrush(decorator.ForeColor);
				border.Background  = ConvertBrush(decorator.BackColor);
					
				shape = border;
				
				var canvas = CreateCanvas(container);
				canvas.Width = decorator.DisplayRectangle.Width -1;
				canvas.Height = decorator.DisplayRectangle.Height -1 ;
				canvas.Background = border.Background;
				AddItemsToCanvas(ref canvas, container);
				border.Child = canvas;
			}
			
			return shape;
		}
Exemple #42
0
 public Ellipse()
 {
     C = new System.Windows.Shapes.Ellipse();
 }