Quantcast
Channel: wpftoolkit Wiki Rss Feed
Viewing all 892 articles
Browse latest View live

Updated Wiki: MultiLineTextEditor

$
0
0

MultiLineTextEditor

Derives from ContentControl

Represents a resizable multi-line text editor that displays in a dropdown.

multilinetexteditor.jpg

Properties

Property Description
DropDownHeight Gets or sets the height of the dropdown.
DropDownWidth Gets or sets the width of the dropdown.
IsOpen Gets or sets a value indicating whether the dropdown is open.
IsSpellCheckEnabled Gets or sets a value indicating whether the spell checker is enabled.
Text Gets or sets the text of the MultiLineEditor.
TextAlignment Gets or sets the alignment of Text.
TextWrapping Gets or sets the text wrapping method of Text.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: Home

$
0
0
June 2014 update: v2.2.0 of the Community Edition released with two new controls and 15 bug fixes and improvements. Subscribers of the Plus Edition got an additional two new controls in v2.2.0, and have just received v2.3.0 with a new control and 30 new bug fixes and improvements (see list).

Extended WPF Toolkit Plus

Extended WPF Toolkit™ is the number one collection of WPF controls, components and utilities for creating next generation Windows applications. Use it to build professional looking, modern, and easy to use line of business applications. The Extended WPF Toolkit project has been downloaded more than 250,000 times here and on Nuget.

The free, open source Community Edition is provided under the Microsoft Public License and includes the following controls:

AvalonDockAutoSelectTextBoxBusyIndicatorButtonSpinner
CalculatorCalculatorUpDownCheckComboBoxCheckListBox
ChildWindowCollectionEditorDataGridCollectionControlDialog
ColorCanvasColorPickerDateTimePickerDateTimeUpDown
DecimalUpDownDoubleUpDownDropDownButtonIntegerUpDown
MagnifierMaskedTextBoxMessageBoxMultiLineTextEditor
PiePrimitiveTypeCollEditorPropertyGridRangeSlider
RichTextBoxRichTextBoxFormatBarSplitButtonPanels/Layouts
TimelinePanelTimePickerTimeSpanUpDownWatermarkTextBox
WindowContainer WindowControl Windows 8 Theme Wizard
Zoombox

Upgrade to Extended WPF Toolkit Plus to be at least one release ahead of the Community Edition, get even more controls and features, and fast, professional support. Update to Xceed Business Suite for WPF to get an even more full-featured version of the industry's best datagrid.

Latest News

New Live Explorer app available online as a Click Once app. Try it now!.

 
Bitcoin You can purchase with bitcoins and get a 1-year, 1-developer subscription for the Plus Edition for 650000 bits (0.65 BTC). Just scroll down to the bottom of any page on http://wpftoolkit.com and select 'Pay with Bitcoin'.
  • June. 2014, released Plus Edition v2.3.0 containing a new controls and 30 bug fixes and improvements. Released Community Edition v2.2.0, containing two new controls and 15 bug fixes and improvements (see list).
  • Feb. 2014, released Plus Edition v2.2.0 containing 4 new controls and 20 bug fixes and improvements. Released Community Edition v2.1.0, containing 70 bug fixes and improvements (see list).
 
Extended WPF Toolkit Plus

Action items

  • Enjoy WPF!
  • Please rate this release and write something positive. It's at the bottom of the downloads page
  • Follow this project (click "follow" at the top right of this page)
  • Follow @datagrid on Twitter for WPF and Toolkit news
  • Like Xceed's WPF page on Facebook
  • Check out a video or two on XceedVideos YouTube Channel
  • Add bugs or feature requests to the Issue Tracker

community-full.png

Updated Wiki: Pie

$
0
0

Pie

Derives from Xceed.Wpf.Toolkit.Primitives.ShapeBase

Draws an arcing segment of a circle, letting developers display data in an easily digestible format, such as in pie charts, or even in things such as pie clocks and pie progress indicators.

The Pie shape is a WPF shape that represents a portion of an ellipse. It is in the same shape as a slice of pie (hence the name). More precisely, the Pie shape is represented as either a full ellipse (Slice = 1.0), nothing (Slice = 0.0), or an arc of an ellipse joined to its center by two line segments.

pie.jpg

Properties

Property Description
DefiningGeometry Overridden Gets the geometry object defining the pie shape.
EndAngle Gets or sets the end angle (in degrees, with 0 on the right) of the pie.
GeometryTransform (Overridden) Gets the identity transform, since pie objects do not use geometry transforms.
Mode Gets or sets the PieMode(Manual, EndAngle, Slice). By default, Manual.
RenderedGeometry (Overridden) Gets the geometry of the rendered pie.
Slice Gets or sets the size of the slice (0 to 1, 1 being a full circle).
StartAngle Gets or sets the start angle (in degrees, with 0 on the right) of the pie.
SweepDirection Gets or sets the direction of the pie(Clockwise, counterClockwise) when going from StartAngle to EndAngle. By default, Counterclockwise.


Updated Wiki: PrimitiveTypeCollectionEditor

$
0
0

PrimitiveTypeCollectionEditor

Derives from ContentControl

Represents an editor of primitive types.

primitivetypecollectioneditor.jpg

Properties

Property Description
IsOpen Gets or sets a value indicating whether the editor's dropdown is open.
IsReadOnly Gets or sets if the control can be edited.
ItemsSource Gets or sets a collection used to generate the content of the control.
ItemsSourceType Gets or sets the type of ItemsSource.
ItemType Gets the type of the item.
Text Gets or sets the text of the editor.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: Pie

$
0
0

Pie

Derives from Xceed.Wpf.Toolkit.Primitives.ShapeBase

Draws an arcing segment of a circle, letting developers display data in an easily digestible format, such as in pie charts, or even in things such as pie clocks and pie progress indicators.

The Pie shape is a WPF shape that represents a portion of an ellipse. It is in the same shape as a slice of pie (hence the name). More precisely, the Pie shape is represented as either a full ellipse (Slice = 1.0), nothing (Slice = 0.0), or an arc of an ellipse joined to its center by two line segments.

pie.jpg

Properties

Property Description
DefiningGeometry Overridden Gets the geometry object defining the pie shape.
EndAngle Gets or sets the end angle (in degrees, with 0 on the right) of the pie.
GeometryTransform (Overridden) Gets the identity transform, since pie objects do not use geometry transforms.
Mode Gets or sets the PieMode(Manual, EndAngle, Slice). By default, Manual.
RenderedGeometry (Overridden) Gets the geometry of the rendered pie.
Slice Gets or sets the size of the slice (0 to 1, 1 being a full circle).
StartAngle Gets or sets the start angle (in degrees, with 0 on the right) of the pie.
SweepDirection Gets or sets the direction of the pie(Clockwise, counterClockwise) when going from StartAngle to EndAngle. By default, Counterclockwise.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: RangeSlider

$
0
0

RangeSlider

Derives from Control

The RangeSlider control lets you set a range with 2 slider thumbs. The lower limit is marked with the right side of the left thumb while the higher limit is marked with the left side of the right thumb.

Properties / Events

Property Description
HigherRangeBackground Gets or sets the Brush for the HigherRange area.
HigherRangeStyle Gets or sets the Style for the HigherRange area.
HigherRangeWidth Gets the percentage of the size of the HigherRange area within the entire min/max range. The higher range area is the area on the slider that is drawn between the higher thumb and the slider's Maximum.
HigherThumbBackground Gets or sets the Brush for the HigherValue thumb.
HigherValue Gets or sets the current higher value.
LowerRangeBackground Gets or sets the Brush for the LowerRange area.
LowerRangeStyle Gets or sets the Style for the LowerRange area.
LowerRangeWidth Gets the percentage of the size of the LowerRange area within the entire min/max range. The lower range area is the area on the slider that is drawn between the slider's Minimum and the lower thumb.
LowerThumBackground Gets or sets the Brush for the LowerValue thumb.
LowerValue Gets or sets the current lower value.
Maximum Gets or sets the maximum value of the input range.
Minimum Gets or sets the minimum value of the input range.
Orientation Gets or sets the orientation used by the RangeSlider.
RangeBackground Gets or sets the Brush for the selected range area.
RangeStyle Gets or sets the Style for the selected range area.
RangeWidth Gets the percentage of the size of the selected range area within the entire min/max range. The selected range area is the area on the slider that is drawn between the lower and higher thumbs.
Step Gets or sets the step size (increase/decrease amount) used by the sliders. Used when the user clicks in the range areas (not the thumbs). Not used when interactively dragging the thumbs.


Event Description
HigherValueChanged Raised when the HigherValue has been changed.
LowerValueChanged Raised when the LowerValue has been changed.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: RichTextBox

$
0
0

RichTextBox

Derives from System.Windows.Controls.RichTextBox

Extends the System.Windows.Control.RichTextBox control that represents a rich editing control which operates on FlowDocument objects. The RichTextBox control has a Text dependency property which allows a user to data bind content to the RichTextBox.Document property. The RichTextBox control introduces the concept of Text Formatters. Text Formatters allows a user to format the content of the RichTextBox control into any format of their choice. Three Text Formatters are included; PlainTextFormatter, RtfFormatter, and a XamlFormatter. The RtfFormatter is the default Text Formatter. A user can create their own custom Text Formatter by creating a class that inherits from ITextFormatter and implimenting the contract accordlingly.

Usage

When data binding to the Text property, you must use the Text Formatter that matches the format of the underlying data. If your data is in RTF you must use the RTF formatter. If your data is in plain text, you must use the PlainTextFormatter.

richtextbox_control.jpg

This RichTextBox is bound to an object that has a Notes property. The value of the Notes property is as follows in the RTF format:

{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch This is the }{\b\ltrch RichTextBox}\li0\ri0\sa0\sb0\fi0\ql\par}}}

<toolkit:RichTextBox x:Name="_richTextBox" Grid.Row="1" Margin="10" BorderBrush="Gray" Padding="10"
                                          Text="{Binding Notes}" 
                                          ScrollViewer.VerticalScrollBarVisibility="Auto" />


Using Formatters

To use a different Text Formatter than the default RtfFormatter use the following syntax:

PlainTextFormatter
<toolkit:RichTextBox x:Name="_richTextBox" Grid.Row="1" Margin="10" BorderBrush="Gray" Padding="10"
                                     Text="{Binding Notes}" 
                                     ScrollViewer.VerticalScrollBarVisibility="Auto">
            <toolkit:RichTextBox.TextFormatter>
                <toolkit:PlainTextFormatter />
            </toolkit:RichTextBox.TextFormatter>
</toolkit:RichTextBox>

Plain Text Format:"This is the RichTextBox\r\n"

RtfFormatter
<toolkit:RichTextBox x:Name="_richTextBox" Grid.Row="1" Margin="10" BorderBrush="Gray" Padding="10"
                                     Text="{Binding Notes}" 
                                     ScrollViewer.VerticalScrollBarVisibility="Auto">
            <toolkit:RichTextBox.TextFormatter>
                <toolkit:RtfFormatter />
            </toolkit:RichTextBox.TextFormatter>
</toolkit:RichTextBox>

RTF Format:"{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch This is the }{\b\ltrch RichTextBox}\li0\ri0\sa0\sb0\fi0\ql\par}}}"

XamlFormatter
<toolkit:RichTextBox x:Name="_richTextBox" Grid.Row="1" Margin="10" BorderBrush="Gray" Padding="10"
                                     Text="{Binding Notes}" 
                                     ScrollViewer.VerticalScrollBarVisibility="Auto">
            <toolkit:RichTextBox.TextFormatter>
                <toolkit:XamlFormatter />
            </toolkit:RichTextBox.TextFormatter>
</toolkit:RichTextBox>

Xaml Format:"<Section xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xml:space=""preserve"" TextAlignment=""Left"" LineHeight=""Auto"" IsHyphenationEnabled=""False"" xml:lang=""en-us"" FlowDirection=""LeftToRight"" NumberSubstitution.CultureSource=""User"" NumberSubstitution.Substitution=""AsCulture"" FontFamily=""Segoe UI"" FontStyle=""Normal"" FontWeight=""Normal"" FontStretch=""Normal"" FontSize=""12"" Foreground=""#FF000000"" Typography.StandardLigatures=""True"" Typography.ContextualLigatures=""True"" Typography.DiscretionaryLigatures=""False"" Typography.HistoricalLigatures=""False"" Typography.AnnotationAlternates=""0"" Typography.ContextualAlternates=""True"" Typography.HistoricalForms=""False"" Typography.Kerning=""True"" Typography.CapitalSpacing=""False"" Typography.CaseSensitiveForms=""False"" Typography.StylisticSet1=""False"" Typography.StylisticSet2=""False"" Typography.StylisticSet3=""False"" Typography.StylisticSet4=""False"" Typography.StylisticSet5=""False"" Typography.StylisticSet6=""False"" Typography.StylisticSet7=""False"" Typography.StylisticSet8=""False"" Typography.StylisticSet9=""False"" Typography.StylisticSet10=""False"" Typography.StylisticSet11=""False"" Typography.StylisticSet12=""False"" Typography.StylisticSet13=""False"" Typography.StylisticSet14=""False"" Typography.StylisticSet15=""False"" Typography.StylisticSet16=""False"" Typography.StylisticSet17=""False"" Typography.StylisticSet18=""False"" Typography.StylisticSet19=""False"" Typography.StylisticSet20=""False"" Typography.Fraction=""Normal"" Typography.SlashedZero=""False"" Typography.MathematicalGreek=""False"" Typography.EastAsianExpertForms=""False"" Typography.Variants=""Normal"" Typography.Capitals=""Normal"" Typography.NumeralStyle=""Normal"" Typography.NumeralAlignment=""Normal"" Typography.EastAsianWidths=""Normal"" Typography.EastAsianLanguage=""Normal"" Typography.StandardSwashes=""0"" Typography.ContextualSwashes=""0"" Typography.StylisticAlternates=""0""><Paragraph><Run>This is the </Run><Run FontWeight=""Bold"">RichTextBox</Run></Paragraph></Section>"

Custom Formatters

To create a custom formatter create a class that inherits from ITextFormatter and implement accordingly.

public class MyFormatter : ITextFormatter
{
        public string GetText(System.Windows.Documents.FlowDocument document)
        {
            return new TextRange(document.ContentStart, document.ContentEnd).Text;
        }

        public void SetText(System.Windows.Documents.FlowDocument document, string text)
        {
            new TextRange(document.ContentStart, document.ContentEnd).Text = text;
        }
 }


Xaml:

<toolkit:RichTextBox x:Name="_richTextBox" Grid.Row="1" Margin="10" BorderBrush="Gray" Padding="10"
                                     Text="{Binding Notes}" 
                                     ScrollViewer.VerticalScrollBarVisibility="Auto">
            <toolkit:RichTextBox.TextFormatter>
                <myCustomFormatter:MyFormatter />
            </toolkit:RichTextBox.TextFormatter>
</toolkit:RichTextBox>


Gotchas

When using the RichTextBox with buttons to change the styles of your text such as bold, italics, etc...,; you will notice that the Text is not updated until the control losses focus. Therefore when you leave focus on the RichTextBox and start manipulating test with buttons, those changes will not be propogated property. This is because by default, the source is not update until the RichTextBox control loses focus. To enable this behavior you must set the UpdateSourceTrigger to PropertyChanged on your Text property binding. This will force any change to the text to be updated through data binding to the underlying data source.

Example:

richtextbox_updatesourcetrigger.jpg

<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="10">
        <Button Command="EditingCommands.ToggleBold" 
                CommandTarget="{Binding ElementName=_richTextBox}"
                Content="B"
                FontWeight="Bold"
                MinWidth="25"/>
            <Button Command="EditingCommands.ToggleItalic" 
                CommandTarget="{Binding ElementName=_richTextBox}"
                Content="I"
                FontStyle="Italic"
                MinWidth="25"/>
        </StackPanel>
        <toolkit:RichTextBox x:Name="_richTextBox" Grid.Row="1" Margin="10" BorderBrush="Gray" Padding="10"
                                     Text="{Binding Notes, UpdateSourceTrigger=PropertyChanged}" 
                                     ScrollViewer.VerticalScrollBarVisibility="Auto">
            <RichTextBox.CommandBindings>
                <CommandBinding Command="EditingCommands.ToggleBold"/>
                <CommandBinding Command="EditingCommands.ToggleItalic"/>
            </RichTextBox.CommandBindings>
        </toolkit:RichTextBox>
</Grid>


Properties

Property Description
Text Gets or sets the text displayed in the RichTextBox.
TextFormatter Gets or sets the ITextFormatter used to format the contents for the RichTextBox. RtfFormatter is Default.


Methods

Method Description
Clear Clears the contents of the RichTextBox.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: RichTextBoxFormatBar

$
0
0

RichTextBoxFormatBar

Derives from Control

The RichTextBoxFormatBar is a contextual formtting toolbar that mimics the behavior of the Microsoft Office 2010 formatting bar. It can be attached to any Richtextbox control by using the RichTextBoxFormatBarManager. You can even create your own formatting bar and use it instead, but still have all the functionality the RichTextboxFormatBarManager provides.

Behavior

richtextformatbar_detailed_updated.jpg

The RichTextBoxFormatBar is a contextual text formatting toolbar that will apply text transformations to the selected text of a RichTextBox control. When the user is in the process of a selection, the RichTextBoxFormatBar will appear when the mouse is released after the selection. The RichTextBoxFormatBar will also appear during the last click of a "double-click" selection. While the RichTextFormatBar is shown, you may click on any number of text transformations to be applied to the selected text. When done, you may click anywhere else in the RichTextBox control or move your mouse outside of the RichTextBox control to hide the RichTextBoxFormatBar. You can also drag the RichTextBoxFormatBar to a different position if it shows in a position that is not desired by clicking and holding on the drag thumb and moving your mouse to the desired location.

Usage

richtextformatbar_in_richtextbox.jpg

You can add the RichTextBoxFormatBar to either the toolkit's RichTextBox or the default Windows RichTextBox. This is done by using the RichTextBoxFormatBarManager. You simply set the RichTextBoxFormatBarManager.FormatBar property to the desired IRichTextBoxFormatBar instance. The following snippet addsthe RichTextBoxFormatBar to the Entended WPF Toolit's RichTextBox.

<xctk:RichTextBox>
       <xctk:RichTextBoxFormatBarManager.FormatBar>
           <xctk:RichTextBoxFormatBar />
       </xctk:RichTextBoxFormatBarManager.FormatBar>
</xctk:RichTextBox>


The following snippet addsthe RichTextBoxFormatBar to the default Windows RichTextBox.

<RichTextBox>
       <xctk:RichTextBoxFormatBarManager.FormatBar>
           <xctk:RichTextBoxFormatBar />
       </xctk:RichTextBoxFormatBarManager.FormatBar>
</RichTextBox>


Create Your Own Format Bar

You create your own custom format bar by creating a custom/user control that implements the IRichTextBoxFormatBar interface and set the RichTextBoxFormatBarManager.FormatBar property to your new custom format bar instance.

<RichTextBox>
       <xctk:RichTextBoxFormatBarManager.FormatBar>
           <local:MyCustomFormatBar />
       </xctk:RichTextBoxFormatBarManager.FormatBar>
</RichTextBox>


Properties

Property Description
FontSizes Gets an array of font sizes.
Target Gets or sets the target RichTextBox.


Methods

Method Description
PreventDisplayFadeOut Returns true if the RichTextBoxFormatBar is in a non-fading state.
Update Updates the RichTextBoxFormatBar.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: SplitButton

$
0
0

SplitButton

Derives from Xceed.Wpf.Toolkit.DropDownButton

The SplitButton control is a button that can be clicked and also provides a drop down in which you can place any custom content within.

splitbutton.jpg
<xctk:SplitButton Content="Click Me">
            <xctk:SplitButton.DropDownContent>
                <xctk:ColorCanvas />
            </xctk:SplitButton.DropDownContent>
        </xctk:SplitButton>

Properties / Events

Property Description
Command Gets or sets the command to execute when the button is clicked.
CommandParameter Gets or sets the command parameter to pass to the Command when the button is clicked.
CommandTarget Gets or sets the element on which to raise the specified command.
DropDownContent Get or sets the object to use as the drop down button's content. (Inherited from DropDownButton)
IsOpen Gets or sets a value indicating whether the dropdown is open. (Inherited from DropDownButton)


Event Description
Click Raised when the control is clicked (Inherited from DropDownButton)
Opened Raised when the DropDownButton dropdown has opened. (Inherited from DropDownButton)
Closed Raised when the DropDownButton dropdown has closed. (Inherited from DropDownButton)


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: TimelinePanel

$
0
0

TimelinePanel

Derives from Panel

TimelinePanel is a WPF panel that arranges its children along a timeline. Items are placed along the timeline based on the Date attached property, which is set on each item.

timelinepanel.jpg

<xctk:TimelinePanel BeginDate="01/01/2007" EndDate="12/31/2007">
            <Image Margin="5,5,5,5" Width="100" xctk:TimelinePanel.Date="02/01/2007" 
                Source="C:\Windows\Web\Wallpaper\Landscapes\img8.jpg" />
            <Image Margin="5,5,5,5" Width="100" xctk:TimelinePanel.Date="03/31/2007" 
                Source="C:\Windows\Web\Wallpaper\Landscapes\img8.jpg" />
            <Image Margin="5,5,5,5" Width="100" xctk:TimelinePanel.Date="07/06/2007" 
                Source="C:\Windows\Web\Wallpaper\Landscapes\img8.jpg" />
            <Image Margin="5,5,5,5" Width="100" xctk:TimelinePanel.Date="10/02/2007" 
                Source="C:\Windows\Web\Wallpaper\Landscapes\img8.jpg" />
        </xctk:TimelinePanel>

UnitSize and UnitTimeSpan

These properties are used to determine how much space (UnitSize, in pixels) is used in the representation of an item on the TimelinePanel by each multiple of a given timespan (UnitTimeSpan). For example, on a TimelinePanel in which UnitSize is set to 5.0 (pixels) and UnitTimeSpan is set to 12 hours, an element that lasts 14 days (336 hours) would be 140 pixels wide:
  • 336 / 12 = 28 intervals of 12 hours
  • 28 * 5 = 140
These properties must be used in conjunction and with valid values for them to work properly.

Properties

Property Description
BeginDate Gets or sets the beginning date of the TimeLinePanel, which corresponds to the beginning or leftmost side of the TimelinePanel. The position of all items in the panel will be calculated relative to this date.
CanHorizontallyScroll Gets or sets a value indicating whether scrolling on the horizontal axis is possible.
CanVerticallyScroll Gets or sets a value indicating whether scrolling on the vertical axis is possible.
Date (attached) Gets or sets the Date of a children.
DateEnd This attached property can be set on items within the TimelinePanel to determine size allotted to an item within the panel. DateEnd is an optional property. If omitted, the item will need to have an explicit Width set on it. If set on an item, the width of the item will be determined by difference between the DateEnd and the Date property.
EndDate Gets or sets the end date of the TimeLinePanel, which corresponds to the end or rightmost side of the TimelinePanel. The position of all items in the panel will be calculated relative to this date.
ExtentHeight Gets a value that contains the vertical size of the extent.
ExtentWidth Gets a value that contains the horizontal size of the extent.
HorizontalOffset Gets a value that contains the horizontal offset of the scrolled content.
KeepOriginalOrderForOverlap Gets or sets a value indicating whether the original order of the children should be respected when items with the same begin and end date overlap.
Orientation Gets or sets the orientation of the timeline (Horizontal or Vertical).
OverlapBehavior Gets or sets the behavior of overlapped items (Stack, Stretch, Hide, None).
ScrollOwner Gets or sets a value that identifies the container that controls scrolling behavior in the panel.
UnitSize Gets or sets the unit size (e.g., in pixels) to use in the timeline. Must be used in conjunction with UnitTimeSpan.
UnitTimeSpan Gets or sets the unit timespan to use in the timeline. Must be used in conjunction with UnitSize.
VerticalOffset Gets the vertical offset of the scrolled content.
ViewportHeight Gets the vertical size of the viewport for this content.
ViewportWidth Gets the horizontal size of the viewport for this content.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: TimePicker

$
0
0

TimePicker

Derives from Control

Represents a control that allows users to select a time.

time_picker.jpg

Properties / Events

Property Description
AllowSpin Gets or sets a value indicating whether interacting with the spinner will result in increment/decrement operations.
ClipValueToMinMax Gets or sets if the value should be clipped when minimum/maximum is reached.
EndTime Gets or sets the last time listed in the control's dropdown.
Format Gets or sets the time format displayed.
FormatString Gets or sets the format string used when Format is set to Custom.
IsOpen Gets or sets a value indicating whether the dropdown is open.
Maximum Gets or sets the Maximum allowed value.
Minimum Gets or sets the Minimum allowed value.
ShowButtonSpinner Gets or sets a value indicating whether the button spinner is shown.
StartTime Gets or sets the first time listed in the control's dropdown.
TextAlignment Gets or sets the alignment of the time picker's text.
TimeInterval Gets or sets the time interval between the TimeItem items listed in the dropdown.
Value Gets or sets the DateTime value of the TimePicker.
Watermark Gets or sets the watermark to display in the control.
WatermarkTemplate Gets or sets the watermark template.


Event Description
ValueChanged Raised when the Value changes.


Get 50+ awesome WPF controls in the Plus Edition.
---

New Comment on "Improvements210"

$
0
0
This changelist says that Metro Light and Dark themes are available for AvalonDock, but this does not seem to be the case. There is only a Metro theme and it is light. Can you explain? Thanks!

New Comment on "Improvements210"

$
0
0
The AvalonDock of the Community Edition includes the following themes : Generic, Aero, VS2010 and Metro. The AvalonDock of the Plus Edition includes all those themes plus Office2007Silver, Office2007Blue, Office2007Black, MetroDark With AccentColor and MetroLight with Accent Color. The changeList will be updated. Thanks.

Updated Wiki: TimeSpanUpDown

$
0
0

TimeSpanUpDown

Derives from Xceed.Wpf.Toolkit.Core.Primitives.DatetimeUpDownBase

The TimeSpanUpDown controls let you increment or decrement a time over 24 hours. The Format is Days.Hours:Minutes:Seconds.

Properties / Events

Property Description
AllowSpin Gets or sets the ability to perform increment/decrement operations via the keyboard, button spinners, or mouse wheel. (Inherited from UpDownBase)
ClipValueToMinMax Gets or sets if the value should be clipped when minimum/maximum is reached. (Inherited from UpDownBase)
DisplayDefaultValueOnEmptyText Gets or sets if the DefaultValue should be displayed when the Text is empty. (Inherited from UpDownBase)
DefaultValue Get or sets the value to use when the Value is null and an increment/decrement operation is performed. (Inherited from UpDownBase)
Maximum Gets or sets the maximum allowed value. (Inherited from UpDownBase)
Minimum Gets or sets the minimum allowed value. (Inherited from UpDownBase)
MouseWheelActiveTrigger Gets or sets when the mouse wheel event should affect the value. (Inherited from UpDownBase)
ShowButtonSpinner Gets or sets if the button spinners are visible. (Inherited from UpDownBase)
Value Gets or sets the numeric value. (Inherited from UpDownBase)
CultureInfo Gets or sets the current CultureInfo. (Inherited from InputBase)
IsReadOnly Gets or sets a value indicating whether the control is read only. (Inherited from InputBase)
Text Gets or sets the formatted string representation of the value. (Inherited from InputBase)
TextAlignment Gets or sets the alignment of the Text. (Inherited from InputBase)
Watermark Gets or sets the object to use as a watermark if the Value is null. (Inherited from InputBase)
WatermarkTemplate Gets or sets the DataTemplate to use for the Watermark. (Inherited from InputBase)


Event Description
ValueChanged Raised when the Value changes. (Inherited from UpDownBase)
InputValidationError Raised when the Text cannot be converted to a valid Value. (Inherited from UpDownBase)


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: TimeSpanUpDown

$
0
0

TimeSpanUpDown

Derives from Xceed.Wpf.Toolkit.Core.Primitives.DatetimeUpDownBase

The TimeSpanUpDown controls let you increment or decrement a time over 24 hours. The Format is Days.Hours:Minutes:Seconds.

timespanupdown.jpg

Properties / Events

Property Description
AllowSpin Gets or sets the ability to perform increment/decrement operations via the keyboard, button spinners, or mouse wheel. (Inherited from UpDownBase)
ClipValueToMinMax Gets or sets if the value should be clipped when minimum/maximum is reached. (Inherited from UpDownBase)
DisplayDefaultValueOnEmptyText Gets or sets if the DefaultValue should be displayed when the Text is empty. (Inherited from UpDownBase)
DefaultValue Get or sets the value to use when the Value is null and an increment/decrement operation is performed. (Inherited from UpDownBase)
Maximum Gets or sets the maximum allowed value. (Inherited from UpDownBase)
Minimum Gets or sets the minimum allowed value. (Inherited from UpDownBase)
MouseWheelActiveTrigger Gets or sets when the mouse wheel event should affect the value. (Inherited from UpDownBase)
ShowButtonSpinner Gets or sets if the button spinners are visible. (Inherited from UpDownBase)
Value Gets or sets the numeric value. (Inherited from UpDownBase)
CultureInfo Gets or sets the current CultureInfo. (Inherited from InputBase)
IsReadOnly Gets or sets a value indicating whether the control is read only. (Inherited from InputBase)
Text Gets or sets the formatted string representation of the value. (Inherited from InputBase)
TextAlignment Gets or sets the alignment of the Text. (Inherited from InputBase)
Watermark Gets or sets the object to use as a watermark if the Value is null. (Inherited from InputBase)
WatermarkTemplate Gets or sets the DataTemplate to use for the Watermark. (Inherited from InputBase)


Event Description
ValueChanged Raised when the Value changes. (Inherited from UpDownBase)
InputValidationError Raised when the Text cannot be converted to a valid Value. (Inherited from UpDownBase)


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: WatermarkTextBox

$
0
0

WatermarkTextBox

Derives from Xceed.Wpf.Toolkit.AutoSelectTextBox

The WatermarkTextBox is simply a TextBox that allows you to specify an object, usually a String, to represent null or missing text.

Using Text

watermarktextbox.jpg

watermarktextbox_withtext.jpg
<xctk:WatermarkTextBox Watermark="Enter First Name" />

Using an Image with Text

watermarktextbox_image.jpg
watermarktextbox_imagename.jpg
<xctk:WatermarkTextBox>
            <xctk:WatermarkTextBox.Watermark>
                <StackPanel Orientation="Horizontal">
                    <Image Source="Contact16.png" Stretch="None" />
                    <TextBlock Text="Enter First Name" Margin="4,0,0,0" />
                </StackPanel>
            </xctk:WatermarkTextBox.Watermark>
        </xctk:WatermarkTextBox>    

Custom WatermarkTemplate

watermarktextbox_template.jpg
<xctk:WatermarkTextBox Watermark="Enter First Name">
            <xctk:WatermarkTextBox.WatermarkTemplate>
                <DataTemplate>
                    <Border BorderBrush="Green" BorderThickness="1">
                        <ContentControl Content="{Binding}" Foreground="DarkRed" FontWeight="Bold" Focusable="False" />
                    </Border>
                </DataTemplate>
            </xctk:WatermarkTextBox.WatermarkTemplate>
        </xctk:WatermarkTextBox>   

Properties

Property Description
AutoMoveFocus Gets or sets a value indicating if the focus can navigate in the appropriate flow direction (e.g., from one cell to another when a cell is being edited) when the cursor is at the beginning or end of the auto-select text box. (Inherited from AutoSelectTextBox)
AutoSelectBehavior Gets or sets a value indicating how the content of the auto-select text box is selected (Never or OnFocus). By default, Never. (Inherited from AutoSelectTextBox)
Watermark Gets or sets the object to use in place of null or missing Text.
WatermarkTemplate Gets or sets the DataTemplate to use to display the Watermark.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: WindowContainer

$
0
0

WindowContainer

Derives from Canvas

Starting with version 2.0, ChildWindow and MessageBox are derived from the WindowControl class and no longer manage their parent’s background or their position based on their parent’s size.

A WindowContainer should now be used to contain these controls. It provides an area where multiple WindowControl-derived controls (ChildWindow or MessageBox controls) can be displayed. This is particularly interesting in an XBAP application where windows can't be popped up. In this case the WindowContainer can be sized to fit the application and the window-like control can be moved around in the WindowContainer.

The WindowContainer derives from Canvas and positions its children according to its size. Many actions performed on its children are managed by the WindowContainer (movement and positioning, resizing, visibility, modal, and mouse click). This will restrict the WindowControl movements and resizing to the WindowContainer’s size.

When no Width and Height are specified in the WindowContainer, its DesiredSize will be the size of its biggest child.

When a child of the WindowContainer is modal (modal ChildWindow or MessageBox) and visible, the background of the WindowContainer can be colored via the ModalBackgroundBrush property.

It can be useful to set the WindowContainer over an application (with the same width and height) and to use a semi-transparent ModalBackgroundBrush property. When a modal window is shown, the application controls will still be visible through the WindowContainer.

In the WindowContainer, the modal windows will always be in front, preventing the use of other windows from the WindowContainer or controls from the application.

<xctk:WindowContainer>
  <xctk:ChildWindow WindowBackground="Blue"
                    Left="75"
                    Top="50"
                    Width="275"
                    Height="125"
                    WindowState="Open">
    <TextBlock Text="This is a Child Window" Padding="10"/>
  </xctk:ChildWindow>

  <xctk:ChildWindow WindowBackground="Green"
                    Left="175"
                    Top="125"
                    Width="275"
                    Height="125"
                    WindowState="Open">
    <TextBlock Text="This is another Child Window" Padding="10"/>
  </xctk:ChildWindow>

  <xctk:MessageBox Caption="MessageBox"
                   Text="This is a MessageBox"/>
</xctk:WindowContainer>

Note: You can find complete documentation of the API here. See the 'Live Explorer' application with source code that demonstrates the features of this class and others here.

Properties

Property Description
ModalBackgroundBrush Gets or sets a Background Color for the WindowContainer when using a modal window.


Support this project, check out the Plus Edition.

Updated Wiki: Wizard

$
0
0

Wizard

Derives from ItemsControl

Represents a wizard control that presents pages to assist the user in performing a task or series of tasks.

wizard.jpg

<xctk:Wizard FinishButtonClosesWindow="True">
            <xctk:WizardPage x:Name="IntroPage" 
                                   Title="Welcome to my Wizard"
                                   Description="This Wizard will walk you though how to do something." />
            <xctk:WizardPage x:Name="Page1" PageType="Interior"
                                   Title="Page 1"
                                   Description="This is the first page in the process."
                                   NextPage="{Binding ElementName=Page2}"
                                   PreviousPage="{Binding ElementName=IntroPage}"/>
            <xctk:WizardPage x:Name="Page2" PageType="Interior"
                                   Title="Page 2"
                                   Description="This is the second page in the process"/>
            <xctk:WizardPage x:Name="LastPage" PageType="Interior"
                                   Title="Last Page"
                                   Description="This is the last page in the process"
                                   CanFinish="True"/>
        </xctk:Wizard>

Properties

Property Description
BackButtonContent Gets or sets the content of the wizard's Back button.
BackButtonVisibility Gets or sets the visibility of the Back button.
CanCancel Gets or sets a value indicating whether the Cancel button is enabled.
CancelButtonClosesWindow Gets or sets a value indicating whether the Cancel button closes the window.
CancelButtonContent Gets or sets the content of the Cancel button.
CancelButtonVisibility Gets or sets the visibility of the Cancel button.
CanFinish Gets or sets a value indicating whether the Finish button is enabled.
CanHelp Gets or sets a value indicating whether the Help button is enabled.
CanSelectNextPage Gets or sets a value indicating whether the Next Page button is enabled.
CanSelectPreviousPage Gets or sets a value indicating whether the Previous Page button is enabled.
CurrentPage Gets or sets the current page in the wizard.
ExteriorPanelMinWidth Gets or sets the minimum width of the exterior panel.
FinishButtonClosesWindow Gets or sets a value indicating whether the Finish button closes the containing window.
FinishButtonContent Gets or sets the content of the Finish button.
FinishButtonVisibility Gets or sets the visibility of the Finish button.
HelpButtonContent Gets or sets the Help button content.
HelpButtonVisibility Gets or sets the visibility of the Help button.
NextButtonContent Gets or sets the Next button content.
NextButtonVisibility Gets or sets the visibility of the Next button.

Events

Event Description
Cancel Raised when the wizard is canceled (the Cancel button is clicked).
Finish Raised when the Finish button is clicked.
Help Raised when the Help button is pressed.
Next Raised when WizardCommands.NextPage command is executed.
PageChanged Raised when the current page changes.
Previous Raised when WizardCommands.PreviousPage command is executed.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: Zoombox

$
0
0

Zoombox

Derives from ContentControl

The Zoombox control provides zoom and pan functionality for its content. It also provides ViewFinder functionality so that the user can identify where they are viewing within the bigger picture. Finally, it provides a view stack and various navigation methods so that the user can navigate back or forward through previous views or zoom to common views.

Properties

Property Description
AnimationAccelerationRatio Gets or sets the acceleration ratio used for scale and pan animations.
AnimationDecelerationRatio Gets or sets the deceleration ratio used for scale and pan animations.
AnimationDuration Gets or sets the duration used for scale and pan animations.
AreDragModifiersActive Gets whether the keys in the DragModifiers collection are currently pressed.
AreRelativeZoomModifiersActive Gets whether the keys in the RelativeZoomModifiers collection are currently pressed.
AreZoomModifiersActive Gets whether the keys in the ZoomModifiers collection are currently pressed.
AreZoomToSelectionModifiersActive Gets whether the keys in the ZoomToSelectionModifiers collection are currently pressed.
AutoWrapContentWithViewbox Gets or sets whether the content of the Zoombox is wrapped in a Viewbox.
CurrentView Gets the current view for the Zoombox.
CurrentViewIndex Gets the index of the current view (see CurrentView) within the Zoombox control's view stack (see the ViewStack).
DragModifiers Gets or sets keys that must be pressed to pan the content by dragging it.
DragOnPreview Gets or sets whether the Zoombox responds to tunneled mouse events to pan the content via a mouse drag.
EffectiveViewStackMode Gets the mode that is currently in effect for the view stack.
HasBackStack Gets whether there are views on the back side of the view stack (see ViewStack).
HasForwardStack Gets whether there are views on the forward side of the view stack (see ViewStack).
IsAnimated Gets or sets whether transitions between views (scale and pan operations) are animated.
IsDraggingContent Gets whether the content is currently being panned via a drag operation.
IsSelectingRegion Gets whether a zoom region is currently being selected.
KeepContentInBounds Gets or sets if we should keep the content in bounds.
MaxScale Gets or sets the maximum scale factor (or zoom level) that can be applied to the content.
MinScale Gets or sets the minimum scale factor (or zoom level) that can be applied to the content.
NavigateOnPreview Gets or sets whether the Zoombox responds to tunneled mouse events (PreviewMouseDown) to navigate through the view stack.
PanDistance Gets or sets how many pixels the content will pan using the PanLeft, PanUp, PanRight, or PanDown Zoombox commands.
Position Gets or sets the top-left point of the content within the Zoombox control.
RelativeZoomModifiers Gets or sets keys that must be pressed to zoom the content relative to the current mouse position using the mouse wheel.
Scale Gets or sets the scale factor (or zoom level) for the content.
ViewFinder Gets a reference to the view finder element within the visual tree of the Zoombox.
Viewport Gets the portion of the content that is visible in the Zoombox. The viewport is expressed in the coordinate space of the content.
ViewStack Gets the view stack for the Zoombox.
ViewStackCount Gets the number of views in the view stack.
ViewStackIndex Gets or sets the index of the selected view within the view stack.
ViewStackMode Gets or sets the mode for the view stack.
ViewStackSource Gets or sets an IEnumerable value representing a collection used to generate a view stack for the Zoombox.
ZoomModifiers Gets or sets keys that must be pressed to zoom the content relative to its ZoomOrigin using the mouse wheel.
ZoomOn Gets or sets what the zoombox should zoom on.
ZoomOnPreview Gets or sets whether the Zoombox responds to tunneled mouse events (PreviewMouseWheel) to zoom the content via the mouse wheel.
ZoomOrigin Gets or sets the relative position within the content around which Zoom operations occur by default.
ZoomPercentage Gets or sets how much the content will zoom when using the ZoomIn or ZoomOut commands or when zooming via the mouse wheel.
ZoomToSelectionModifiers Gets or sets keys that must be pressed to select and zoom to a location of the content using the mouse.

Methods

Method Description
CenterContent Centers the content within the Zoombox control without changing its scale.
FillToBounds Scales the content to completely fill the bounds of the Zoombox control.
FitToBounds Scales the content to fit within the bounds of the Zoombox control.
GetViewFinderVisibility Gets the ViewFinderVisibility attached dependency property.
GoBack Navigates to the previous view on the view stack.
GoForward Navigates to the next view on the view stack.
GoHome Navigates to the first view on the view stack.
OnApplyTemplate. Overridden to give us an opportunity to initialize the control.
RefocusView Refocuses the view currently selected within the view stack (the view identified by the ViewStackIndex property).
SetViewFinderVisibility Sets the ViewFinderVisibility attached dependency property.
Zoom Overloaded. Scales the content by a given percentage relative to the point identified by the ZoomOrigin property.
ZoomTo Overloaded. Scales the content to a specific scale value relative to the ZoomOrigin.

Events

Event Description
AnimationBeginning Raised when the transition animation is about to begin.
AnimationCompleted Raised when the transition animation completes.
CurrentViewChanged Raised when the CurrentView property changes.
ViewStackIndexChanged Raised when the ViewStackIndex property changes.


Get 50+ awesome WPF controls in the Plus Edition.
---

Updated Wiki: AvalonDock

$
0
0

AvalonDock (docking window control)

AvalonDock provides a system that allow developers to create customizable layouts using a window docking system similar to what is found in many popular integrated development environements (IDEs).

AvalonDock adheres to an MVVM design. The Model is represented by the classes contained in the Xceed.Wpf.AvalonDock.Layout namespace. The classes in this namespace are the layout elements in a layout model (for example LayoutAnchorable/LayoutDocument, LayoutAnchorablePane/LayoutDocumentPane, LayoutAnchorablePaneGroup/LayoutDocumentPaneGroup, etc.) that are used directly in XAML within a DockingManager to describe how the layout is composed.

avalondock.jpg

The following example shows how to set up varioius layout elements in a DockingManager.

<local:DemoView x:Class="LiveExplorer.Samples.AvalonDock.Views.AvalonDockView"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:local="clr-namespace:LiveExplorer"
                 xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                 xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
                 xmlns:s="clr-namespace:System;assembly=mscorlib">
   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition Height="*" />
      </Grid.RowDefinitions>

      <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
         <TextBlock Text="Theme:" Margin="0,0,10,0" VerticalAlignment="Center"/>
         <ComboBox x:Name="_themeCombo" SelectedIndex="0" Width="200">
            <ComboBoxItem Content="Generic" />
            <ComboBoxItem Content="Aero">
               <ComboBoxItem.Tag>
                  <xcad:AeroTheme />
               </ComboBoxItem.Tag>
            </ComboBoxItem>
            <ComboBoxItem Content="VS2010">
               <ComboBoxItem.Tag>
                  <xcad:VS2010Theme />
               </ComboBoxItem.Tag>
            </ComboBoxItem>
            <ComboBoxItem Content="Metro">
               <ComboBoxItem.Tag>
                  <xcad:MetroTheme />
               </ComboBoxItem.Tag>
            </ComboBoxItem>
         </ComboBox>
      </StackPanel>

      <xcad:DockingManager Grid.Row="1" MaxHeight="425"
                           AllowMixedOrientation="True"
                           BorderBrush="Black"
                           BorderThickness="1"
                           Theme="{Binding ElementName=_themeCombo, Path=SelectedItem.Tag}">
         <xcad:DockingManager.DocumentHeaderTemplate>
            <DataTemplate>
               <StackPanel Orientation="Horizontal">
                  <Image Source="{Binding IconSource}" Margin="0,0,4,0"/>
                  <TextBlock Text="{Binding Title}" />
               </StackPanel>
            </DataTemplate>
         </xcad:DockingManager.DocumentHeaderTemplate>
         <xcad:LayoutRoot x:Name="_layoutRoot">
            <xcad:LayoutPanel Orientation="Horizontal">
               <xcad:LayoutAnchorablePane DockWidth="200">
                  <xcad:LayoutAnchorable ContentId="properties" Title="Properties" CanHide="False" CanClose="False"
                                            AutoHideWidth="240"
                                         IconSource="../Images/property-blue.png">
                     <xctk:PropertyGrid NameColumnWidth="110"
                        SelectedObject="{Binding ElementName=_layoutRoot, Path=LastFocusedDocument.Content}"/>
                  </xcad:LayoutAnchorable>
               </xcad:LayoutAnchorablePane>
               <xcad:LayoutDocumentPaneGroup >
                  <xcad:LayoutDocumentPane>
                     <xcad:LayoutDocument ContentId="document1" Title="Document 1" IconSource="../Images/document.png" >
                           <Button Content="Document 1 Content" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                     </xcad:LayoutDocument>
                     <xcad:LayoutDocument ContentId="document2" Title="Document 2" IconSource="../Images/document.png">
                        <TextBox Text="Document 2 Content" AcceptsReturn="True"/>
                     </xcad:LayoutDocument>
                  </xcad:LayoutDocumentPane>
               </xcad:LayoutDocumentPaneGroup >
               <xcad:LayoutAnchorablePaneGroup DockWidth="125">
                  <xcad:LayoutAnchorablePane>
                     <xcad:LayoutAnchorable ContentId="alarms" Title="Alarms" IconSource="../Images/alarm-clock-blue.png" >
                        <ListBox>
                           <s:String>Alarm 1</s:String>
                           <s:String>Alarm 2</s:String>
                           <s:String>Alarm 3</s:String>
                        </ListBox>
                     </xcad:LayoutAnchorable>
                     <xcad:LayoutAnchorable ContentId="journal" Title="Journal" >
                        <RichTextBox>
                           <FlowDocument>
                              <Paragraph FontSize="14" FontFamily="Segoe">
                                 This is the content of the Journal Pane.
                                 <LineBreak/>
                                 A
                                 <Bold>RichTextBox</Bold> has been added here
                              </Paragraph>
                           </FlowDocument>
                        </RichTextBox>
                     </xcad:LayoutAnchorable>
                  </xcad:LayoutAnchorablePane>
               </xcad:LayoutAnchorablePaneGroup>
            </xcad:LayoutPanel>

            <xcad:LayoutRoot.LeftSide>
               <xcad:LayoutAnchorSide>
                  <xcad:LayoutAnchorGroup>
                     <xcad:LayoutAnchorable Title="Agenda" ContentId="agenda" IconSource="../Images/address-book-open.png">
                        <TextBlock Text="Agenda Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/>
                     </xcad:LayoutAnchorable>
                     <xcad:LayoutAnchorable Title="Contacts" ContentId="contacts" IconSource="../Images/address-book--pencil.png" >
                        <TextBlock Text="Contacts Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/>
                     </xcad:LayoutAnchorable>
                  </xcad:LayoutAnchorGroup>
               </xcad:LayoutAnchorSide>
            </xcad:LayoutRoot.LeftSide>
         </xcad:LayoutRoot>
      </xcad:DockingManager>
   </Grid>
</local:DemoView>


The view is represented by the classes contained in the Xceed.Wpf.AvalonDock.Controls namespace; these classes are a set of stylizable controls that show the user controls. The names of the view controls typically end with "Control" and correspond to a layout model class (for example, LayoutAnchorableControl is the view control that corresponds to LayoutAnchorable, which is the model element).

The DockingManager, which is contained in the Xceed.Wpf.AvalonDock namespace, uses various classes (such as the LayoutItem and its derived classes) to perform the role of the ViewModel, preparing the model to be consumed by the view.

There is only one logical tree, which has the DockingManager as its root. Even if a control is placed in a different window (i.e., an autohidden window or a floating window), it always belong to the same logical tree below the DockingManager.

The DockingManager class

The DockingManager class is the core control of AvalonDock. Its Layout property contains the layout composition that is represented by the classes in the Xceed.Wpf.AvalonDock.Layout namespace. The class arranges the panes it contains and also handles auto-hide windows and floating windows (panes in turn contain, directly or indirectly, the two types of "content" elements, namely, LayoutAnchorable and LayoutDocument elements). The DockingManager class also handles saving and restoring layouts.

Among other properties, the class provides several "Template" properties (e.g., AnchorableTitleTemplate/DocumentTitleTemplate, AnchorableHeaderTemplate/DocumentHeaderTemplate, etc.) that allow designers and developers to specify the template for the elements contained in the layout.

Layout model classes

The layout element classes are used within the layout model held in the Layout property of the DockingManager. The fundamental content-containing classes in AvalonDock are LayoutAnchorable and LayoutDocument; both of these classes derive from the LayoutContent class, which determines whether an element can close, float (be dragged and transformed into a floating window), etc.

An anchorable is typically the container of application controls and can be dragged away from its container pane (LayoutAnchorablePane) and repositioned into another pane. Anchorables are always contained in a pane, which can be either a LayoutAnchorablePane or a LayoutDocumentPane, whereas documents (class LayoutDocument) can only be contained in a LayoutDocumentPane. Anchorables can also be dragged to a border of the parent DockingManager, which causes them to appear above, below, to the left of, or to the right of all other anchorables or documents (except for autohide windows; see the LayoutAnchorSide / LayoutAnchorGroup section below for details). Anchorables can also be left in a floating state (LayoutAnchorableFloatingWindow). Unlike documents, anchorables can autohide, where their content collapses to one side of the docking manager and is represented only by a tab (see LayoutAnchorSide and LayoutAnchorGroup).

A document (LayoutDocument class) can be hosted only in a LayoutDocumentPane. This contrasts with the behavior of LayoutAnchorable, which can be hosted both in a LayoutDocumentPane and a LayoutAnchorablePane. Also, unlike anchorables, documents can't be anchored to a DockingManager border and can't be autohidden: they can only be positioned into a LayoutDocumentPane or floated in a LayoutDocumentFloatingWindow.

A LayoutAnchorableFloatingWindow or a LayoutDocumentFloatingWindow is created automatically when the end-user drags an anchorable over the DockingManager. Floating windows can also be created programmatically using the Float method).

LayoutContent-derived elements (LayoutAnchorable and LayoutDocument) are typically arranged as in a tab control. A LayoutAnchorablePane can be set to autohide and can be dragged over the DockingManager as floating window. A LayoutAnchorablePane can also be anchored to a border of the parent DockingManager (see LayoutAnchorSide for more details).

Unlike a LayoutAnchorablePane, a LayoutDocumentPane cannot be set to autohide or dragged over the DockingManager as floating window (although individual LayoutDocument elements can be floated). A LayoutAnchorablePane also can't be anchored to a border of the parent DockingManager.

A LayoutPanel can also contain "pane group" elements (i.e., LayoutAnchorablePaneGroup or LayoutDocumentPaneGroup), which group child panes together and allow various characteristics to be determined, such as the initial width/height the docked group occupies, the initial width/height of floating windows created from content dragged from them, and the orientation of the panes in the group (which is independent of the orientation of the LayoutPanel). LayoutAnchorablePaneGroup represents an element in the layout model that can contain and arrange multiple LayoutAnchorablePane elements, which in turn contain LayoutAnchorable elements. LayoutDocumentPaneGroup represents an element in the layout model that can contain and organize multiple LayoutDocumentPane elements, which in turn contain LayoutDocument elements. The "pane group" classes are primarily used to determine the orientation of the panes they contain.

LayoutRoot represents the root of the layout model. The Layout property of DockingManager is set to an instance of this class.

The RootPanel property of the LayoutRoot class is set to an instance of the LayoutPanel class.

A LayoutPanel can contain child panes directly (that is, LayoutAnchorablePane and LayoutDocumentPane). Panes in turn contain the actual content (that is, LayoutAnchorable or LayoutDocument elements, both of which derive from LayoutContent). A LayoutPanel can also contain "pane group" instances (i.e., LayoutAnchorablePaneGroup or LayoutDocumentPaneGroup), which group child panes together and allow various characteristics to be determined, such as the initial width/height the docked group occupies, the initial width/height of floating windows created from content dragged from them, and the orientation of the panes in the group (which is independent of the orientation of the LayoutPanel).

The LayoutRoot class provides four "Side" properties (e.g., LeftSide), which are used in conjunction with the LayoutAnchorSide and the LayoutAnchorGroup classes to set up autohide LayoutAnchorable elements along the border of the containing DockingManager. These elements are initially collapsed to the side to which they are anchored, displaying only a tab, and the "pin" glyph is pointing to the left. If the pin glyph of an autohide anchorable is clicked so that the pin is pointing down, the anchorable is no longer remains visible. Only LayoutAnchorable elements can be autohidden.

LayoutAnchorGroup represents an autohidden group of one or more LayoutAnchorable elements that can be anchored to one of the four sides of the DockingManager. To use LayoutAnchorGroup, add LayoutAnchorable elements to it, and add the resulting LayoutAnchorGroup to an instance of LayoutAnchorSide. The resulting LayoutAnchorSide is then assigned to a "Side" property (e.g., LeftSide, TopSide) of the LayoutRoot object held in the Layout property of DockingManager.

LayoutAnchorSide represents a "side" in a DockingManager. To use LayoutAnchorSide, add LayoutAnchorable elements to a LayoutAnchorGroup, and add the resulting LayoutAnchorGroup to an instance of LayoutAnchorSide. The resulting LayoutAnchorSide is then assigned to a "Side" property (e.g., LeftSide, TopSide) of the LayoutRoot object held in the Layout property of DockingManager.

Note: You can find complete documentation of the API here. See the 'Live Explorer' application with source code that demonstrates the features of this class and others here.

Support this project, check out the Plus Edition.
Viewing all 892 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>