System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, object)

Here are the examples of the csharp api System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2323 Examples 7

19 View Source File : VirtualizingWrapPanel .cs
License : MIT License
Project Creator : 944095635

private static void SetVirtualItemIndex(DependencyObject obj, int value)
        {
            obj.SetValue(VirtualItemIndexProperty, value);
        }

19 View Source File : StockChartHelper.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetShowTooltipLabel(DependencyObject element, bool value)
        {
            element.SetValue(ShowTooltipLabelProperty, value);
        }

19 View Source File : ScrollViewerExtensions.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetCanContentScroll(DependencyObject element, bool value)
        {
            element.SetValue(CanContentScrollProperty, value);
        }

19 View Source File : TextBoxHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SereplacedermarkContent(DependencyObject element, object value)
        {
            element.SetValue(WatermarkContentProperty, value);
        }

19 View Source File : TextBoxHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SereplacedermarkContentTemplate(DependencyObject element, DataTemplate value)
        {
            element.SetValue(WatermarkContentTemplateProperty, value);
        }

19 View Source File : TextBoxHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetIsShowingWatermark(DependencyObject element, bool value)
        {
            element.SetValue(IsShowingWatermarkProperty, value);
        }

19 View Source File : TextBoxHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetLoseFocusOnEscape(DependencyObject element, bool value)
        {
            element.SetValue(LoseFocusOnEscapeProperty, value);
        }

19 View Source File : TextBoxHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetClearButton(DependencyObject element, bool value)
        {
            element.SetValue(ClearButtonProperty, value);
        }

19 View Source File : TextBoxHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetCornerRadius(DependencyObject element, CornerRadius value)
        {
            element.SetValue(CornerRadiusProperty, value);
        }

19 View Source File : SwitchAxisTypeBehavior.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetUseAlternateYAxis(DependencyObject element, bool value)
        {
            element.SetValue(UseAlternateYAxisProperty, value);
        }

19 View Source File : LineSeriesSource.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetDataSeries(UIElement element, IEnumerable<IDataSeries> value)
        {
            element.SetValue(DataSeriesProperty, value);
        }

19 View Source File : Navigator.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetStartPage(DependencyObject element, Guid value)
        {
            element.SetValue(StartPageProperty, value);
        }

19 View Source File : Navigator.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetExampleStartPage(DependencyObject element, Guid value)
        {
            element.SetValue(ExampleStartPageProperty, value);
        }

19 View Source File : EndlessItemsControl.cs
License : MIT License
Project Creator : ABTSoftware

private void AddMoreItems()
        {
            var isBusy = (bool)GetValue(IsBusyProperty);
            if (!isBusy)
            {
                SetValue(IsBusyProperty, true);
                SetValue(IsBusyProperty, false);
                SetValue(IsBusyProperty, true);
                var delay = (TimeSpan)GetValue(PreLoadingDelayProperty);
                
                Task.Factory.StartNew(() =>
                {
                    Thread.Sleep(delay);

                    var items = _allItems.Take(10).ToList();
                    items.ForEach(item =>
                    {
                        Dispatcher.BeginInvoke(new Action(() => Currenreplacedems.Add(item)));
                        _allItems.Remove(item);
                    });
                }).ContinueWith(_ =>
                {
                    Dispatcher.BeginInvoke(new Action(() => SetValue(IsBusyProperty, false)));
                });
            }
        }

19 View Source File : CollapsableGridSplitter.cs
License : MIT License
Project Creator : ABTSoftware

private void Collapse()
        {
            Grid parentGrid = base.Parent as Grid;
            int splitterIndex = int.MinValue;

            if (_gridCollapseDirection == GridCollapseDirection.Rows)
            {
                // Get the index of the row containing the splitter
                splitterIndex = (int)base.GetValue(Grid.RowProperty);

                // Determing the curent CollapseMode
                if (this.CollapseMode == GridSplitterCollapseMode.Next)
                {
                    // Save the next rows Height information
                    _savedGridLength = parentGrid.RowDefinitions[splitterIndex + 1].Height;
                    _savedActualValue = parentGrid.RowDefinitions[splitterIndex + 1].ActualHeight;

                    // Collapse the next row
                    if (IsAnimated)
                        AnimateCollapse(parentGrid.RowDefinitions[splitterIndex + 1]);
                    else
                        parentGrid.RowDefinitions[splitterIndex + 1].SetValue(RowDefinition.HeightProperty, new GridLength(0));
                }
                else
                {
                    // Save the previous row's Height information
                    _savedGridLength = parentGrid.RowDefinitions[splitterIndex - 1].Height;
                    _savedActualValue = parentGrid.RowDefinitions[splitterIndex - 1].ActualHeight;

                    // Collapse the previous row
                    if (IsAnimated)
                        AnimateCollapse(parentGrid.RowDefinitions[splitterIndex - 1]);
                    else
                        parentGrid.RowDefinitions[splitterIndex - 1].SetValue(RowDefinition.HeightProperty, new GridLength(0));
                }
            }
            else
            {
                // Get the index of the column containing the splitter
                splitterIndex = (int)base.GetValue(Grid.ColumnProperty);

                // Determing the curent CollapseMode
                if (this.CollapseMode == GridSplitterCollapseMode.Next)
                {
                    // Save the next column's Width information
                    _savedGridLength = parentGrid.ColumnDefinitions[splitterIndex + 1].Width;
                    _savedActualValue = parentGrid.ColumnDefinitions[splitterIndex + 1].ActualWidth;

                    // Collapse the next column
                    if (IsAnimated)
                        AnimateCollapse(parentGrid.ColumnDefinitions[splitterIndex + 1]);
                    else
                        parentGrid.ColumnDefinitions[splitterIndex + 1].SetValue(ColumnDefinition.WidthProperty, new GridLength(0));
                }
                else
                {
                    // Save the previous column's Width information
                    _savedGridLength = parentGrid.ColumnDefinitions[splitterIndex - 1].Width;
                    _savedActualValue = parentGrid.ColumnDefinitions[splitterIndex - 1].ActualWidth;

                    // Collapse the previous column
                    if (IsAnimated)
                        AnimateCollapse(parentGrid.ColumnDefinitions[splitterIndex - 1]);
                    else
                        parentGrid.ColumnDefinitions[splitterIndex - 1].SetValue(ColumnDefinition.WidthProperty, new GridLength(0));
                }
            }

        }

19 View Source File : CollapsableGridSplitter.cs
License : MIT License
Project Creator : ABTSoftware

private void Expand()
        {
            Grid parentGrid = base.Parent as Grid;
            int splitterIndex = int.MinValue;

            if (_gridCollapseDirection == GridCollapseDirection.Rows)
            {
                // Get the index of the row containing the splitter
                splitterIndex = (int)this.GetValue(Grid.RowProperty);

                // Determine the curent CollapseMode
                if (this.CollapseMode == GridSplitterCollapseMode.Next)
                {
                    // Expand the next row
                    if (IsAnimated)
                        AnimateExpand(parentGrid.RowDefinitions[splitterIndex + 1]);
                    else
                        parentGrid.RowDefinitions[splitterIndex + 1].SetValue(RowDefinition.HeightProperty, _savedGridLength);
                }
                else
                {
                    // Expand the previous row
                    if (IsAnimated)
                        AnimateExpand(parentGrid.RowDefinitions[splitterIndex - 1]);
                    else
                        parentGrid.RowDefinitions[splitterIndex - 1].SetValue(RowDefinition.HeightProperty, _savedGridLength);
                }
            }
            else
            {
                // Get the index of the column containing the splitter
                splitterIndex = (int)this.GetValue(Grid.ColumnProperty);

                // Determine the curent CollapseMode
                if (this.CollapseMode == GridSplitterCollapseMode.Next)
                {
                    // Expand the next column
                    if (IsAnimated)
                        AnimateExpand(parentGrid.ColumnDefinitions[splitterIndex + 1]);
                    else
                        parentGrid.ColumnDefinitions[splitterIndex + 1].SetValue(ColumnDefinition.WidthProperty, _savedGridLength);
                }
                else
                {
                    // Expand the previous column
                    if (IsAnimated)
                        AnimateExpand(parentGrid.ColumnDefinitions[splitterIndex - 1]);
                    else
                        parentGrid.ColumnDefinitions[splitterIndex - 1].SetValue(ColumnDefinition.WidthProperty, _savedGridLength);
                }
            }
        }

19 View Source File : ExampleHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetLoadedEventCommand(DependencyObject element, ICommand value)
        {
            element.SetValue(LoadedEventCommandProperty, value);
        }

19 View Source File : ExampleHelpers.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetUnloadedEventCommand(DependencyObject element, ICommand value)
        {
            element.SetValue(UnloadedEventCommandProperty, value);
        }

19 View Source File : Clip.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetToBounds(DependencyObject depObj, bool clipToBounds)
        {
            depObj.SetValue(ToBoundsProperty, clipToBounds);
        }

19 View Source File : CodeHighlighter.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetSourceCode(DependencyObject o, string code)
        {
            o.SetValue(SourceCodeProperty, code);
        }

19 View Source File : RichTextBoxHelper.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetText(DependencyObject o, string value)
        {
            o.SetValue(TextProperty, value);
        }

19 View Source File : ContentPresenterHelper.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetContentTemplate(DependencyObject element, string value)
        {
            element.SetValue(ContentTemplateProperty, value);
        }

19 View Source File : FrameworkVisibilityManager.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetVisibleIn(DependencyObject element, FrameworkVisibility visibleIn)
        {
            element.SetValue(VisibleInProperty, visibleIn);
        }

19 View Source File : PlaneProjector.cs
License : MIT License
Project Creator : ABTSoftware

private FrameworkElement CreateVisualChild()
        {
            MeshGeometry3D simpleQuad = new MeshGeometry3D()
            {
                Positions = new Point3DCollection(_mesh),
                TextureCoordinates = new PointCollection(_texCoords),
                TriangleIndices = new Int32Collection(_indices)
            };

            // Front material is interactive, back material is not.
            Material frontMaterial = new DiffuseMaterial(Brushes.White);
            frontMaterial.SetValue(Viewport2DVisual3D.IsVisualHostMaterialProperty, true);

            VisualBrush vb = new VisualBrush(_logicalChild);
            SetCachingForObject(vb);  // big perf wins by caching!!
            Material backMaterial = new DiffuseMaterial(vb);

            _rotationTransform.Rotation = _quaternionRotation;
            var xfGroup = new Transform3DGroup() { Children = { _scaleTransform, _rotationTransform } };

            GeometryModel3D backModel = new GeometryModel3D() { Geometry = simpleQuad, Transform = xfGroup, BackMaterial = backMaterial };
            Model3DGroup m3dGroup = new Model3DGroup()
            {
                Children = { new DirectionalLight(Colors.White, new Vector3D(0, 0, -1)), 
                                 new DirectionalLight(Colors.White, new Vector3D(0.1, -0.1, 1)),
                                 backModel }
            };

            // Non-interactive Visual3D consisting of the backside, and two lights.
            ModelVisual3D mv3d = new ModelVisual3D() { Content = m3dGroup };

            // Interactive frontside Visual3D
            Viewport2DVisual3D frontModel = new Viewport2DVisual3D() { Geometry = simpleQuad, Visual = _logicalChild, Material = frontMaterial, Transform = xfGroup };

            // Cache the brush in the VP2V3 by setting caching on it.  Big perf wins.
            SetCachingForObject(frontModel);

            // Scene consists of both the above Visual3D's.
            _viewport3d = new Viewport3D() { ClipToBounds = false, Children = { mv3d, frontModel } };

            UpdateRotation();

            return _viewport3d;
        }

19 View Source File : CustomRotateChartModifier.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetIsRotationEnabled(DependencyObject obj, bool value)
        {
            obj.SetValue(IsRotationEnabledProperty, value);
        }

19 View Source File : CheckedChangeZoomExtentsBehaviour.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetEnableZoomExtentsOnChecked(DependencyObject element, bool value)
        {
            element.SetValue(EnableZoomExtentsOnCheckedProperty, value);
        }

19 View Source File : SeriesExtensions.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetDrawLine(DependencyObject element, bool value)
        {
            element.SetValue(DrawLineProperty, value);
        }

19 View Source File : SeriesExtensions.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetDrawMarker(DependencyObject element, bool value)
        {
            element.SetValue(DrawMarkerProperty, value);
        }

19 View Source File : SwitchAxisTypeBehavior.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetUseAlternateXAxis(DependencyObject element, bool value)
        {
            element.SetValue(UseAlternateXAxisProperty, value);
        }

19 View Source File : TextElementEx.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetForeground(DependencyObject element, Brush value)
        {
            element.SetValue(ForegroundProperty, value);
        }

19 View Source File : AxisGridlineBehaviour.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetGridStroke(DependencyObject element, SolidColorBrush value)
        {
            element.SetValue(GridStrokeProperty,value);
        }

19 View Source File : SurfaceMeshSelectionModifier.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetIncludeSeries(DependencyObject obj, bool value)
        {
            obj.SetValue(IncludeSeriesProperty, value);
        }

19 View Source File : YAxisSameZeroLine.xaml.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetSyncZeroLineGroup(DependencyObject element, string value)
        {
            element.SetValue(SyncZeroLineGroupProperty, value);
        }

19 View Source File : ZoomOnVisibilityBehaviour.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetZoomExtentsOnVisibilityChanged(DependencyObject element, bool value)
        {
            element.SetValue(ZoomExtentsOnVisibilityChangedProperty, value);
        }

19 View Source File : LineSeriesSource.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetStrokeThickness(DependencyObject element, float value)
        {
            element.SetValue(StrokeThicknessProperty, value);
        }

19 View Source File : LineSeriesSource.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetAntiAliasing(DependencyObject element, bool value)
        {
            element.SetValue(AntiAliasingProperty, value);
        }

19 View Source File : DataGridExtension.cs
License : MIT License
Project Creator : ABTSoftware

public static void SetColumns(DependencyObject obj, ObservableCollection<DataGridColumn> value)
        {
            obj.SetValue(ColumnsProperty, value);
        }

19 View Source File : WebBrowserBehavior.cs
License : MIT License
Project Creator : Actipro

private static void SetWebBrowserBehaviorContext(DependencyObject obj, BehaviorContext value) {
			if (obj == null)
				throw new ArgumentNullException("obj");
			obj.SetValue(WebBrowserBehaviorContextProperty, value);
		}

19 View Source File : WebBrowserBehavior.cs
License : MIT License
Project Creator : Actipro

public static void SetAreScriptErrorsDisabled(DependencyObject obj, bool value) {
			if (obj == null)
				throw new ArgumentNullException("obj");
			obj.SetValue(AreScriptErrorsDisabledProperty, value);
		}

19 View Source File : NewRowTemplateBehavior.cs
License : MIT License
Project Creator : Actipro

[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPreplacedingBaseTypesAsParameters")]
		public static void SetTemplate(DataGridControl obj, ControlTemplate value) {
			if (null == obj) throw new ArgumentNullException("obj");
			obj.SetValue(NewRowTemplateBehavior.TemplateProperty, value);
		}

19 View Source File : DataGridBoundColumnBase.cs
License : MIT License
Project Creator : Actipro

protected virtual void ApplyValue(DependencyProperty sourceProperty, FrameworkElement targetElement, DependencyProperty targetProperty) {
			if (sourceProperty == null)
				throw new ArgumentNullException("sourceProperty");
			else if (targetElement == null)
				throw new ArgumentNullException("targetElement");
			else if (targetProperty == null)
				throw new ArgumentNullException("targetProperty");

			// 8/22/2011 - If the property is not set on the column, then do not preplaced down to the element (10F-15E35C2E-480E)
			// 1/27/2012 - Fixed issue with column default that differ from the column not getting preplaceded down properly (197-16B573BD-0301)
			if (DependencyPropertyHelper.GetValueSource(this, sourceProperty).BaseValueSource == BaseValueSource.Default &&
				DefaultValuesEqual(sourceProperty.GetMetadata(this), targetProperty.GetMetadata(targetElement)))
				targetElement.ClearValue(targetProperty);
			else
				targetElement.SetValue(targetProperty, this.GetValue(sourceProperty));
		}

19 View Source File : PasswordHelper.cs
License : MIT License
Project Creator : adospace

public static void SetCheckPreplacedwordIsEmpty(DependencyObject obj, bool value)
        {
            obj.SetValue(CheckPreplacedwordIsEmptyProperty, value);
        }

19 View Source File : PasswordHelper.cs
License : MIT License
Project Creator : adospace

public static void SetHasPreplacedwordEmpty(DependencyObject obj, bool value)
        {
            obj.SetValue(HasPreplacedwordEmptyProperty, value);
        }

19 View Source File : FabricHelper.cs
License : MIT License
Project Creator : adospace

public static void SetTextColumnStyle(DependencyObject d, Style value)
        {
            d.SetValue(TextColumnStyleProperty, value);
        }

19 View Source File : FabricHelper.cs
License : MIT License
Project Creator : adospace

public static void SetComboBoxColumnStyle(DependencyObject d, Style value)
        {
            d.SetValue(ComboBoxColumnStyleProperty, value);
        }

19 View Source File : FabricHelper.cs
License : MIT License
Project Creator : adospace

public static void SetCheckBoxColumnStyle(DependencyObject d, Style value)
        {
            d.SetValue(CheckBoxColumnStyleProperty, value);
        }

19 View Source File : FabricHelper.cs
License : MIT License
Project Creator : adospace

public static void SetCheckBoxColumnEditingStyle(DependencyObject d, Style value)
        {
            d.SetValue(CheckBoxColumnEditingStyleProperty, value);
        }

19 View Source File : FabricExtra.cs
License : MIT License
Project Creator : adospace

public static void SetLabel(DependencyObject obj, string value)
        {
            obj.SetValue(LabelProperty, value);
        }

19 View Source File : FabricExtra.cs
License : MIT License
Project Creator : adospace

public static void SetErrorMessage(DependencyObject obj, string value)
        {
            obj.SetValue(ErrorMessageProperty, value);
        }

19 View Source File : FabricExtra.cs
License : MIT License
Project Creator : adospace

public static void SetCompactMode(DependencyObject obj, bool value)
        {
            obj.SetValue(LabelProperty, value);
        }

See More Examples