AppointmentInplaceEditorBase Class
Provides all the settings which are required to edit a particular appointment in a custom in-place editor.
Namespace: DevExpress.Xpf.Scheduler.UI
Assembly:
DevExpress.Xpf.Scheduler.v21.2.dll
NuGet Package:
DevExpress.Wpf.Scheduler
Declaration
public class AppointmentInplaceEditorBase :
UserControl,
ISchedulerInplaceEditorEx,
IDisposable
Public Class AppointmentInplaceEditorBase
Inherits UserControl
Implements ISchedulerInplaceEditorEx,
IDisposable
Important
You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.
The AppointmentInplaceEditorBase class enables you to create your own custom in-place editor, and use it instead of the default editor. It can be helpful, for example, when it is necessary to create something between an Edit Appointment form and simple subject in-place editor.
Example
This example illustrates how to create a custom in-place editor using the AppointmentInplaceEditorBase
class.
View Example
Partial Public Class CustomInplaceEditor
Inherits AppointmentInplaceEditorBase
Public Sub New(ByVal control As SchedulerControl, ByVal apt As Appointment)
MyBase.New(control, apt)
InitializeComponent()
End Sub
Private Sub OK_button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
OnCommitChanges()
End Sub
Private Sub Cancel_button_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
OnRollbackChanges()
End Sub
End Class
<dxschui:AppointmentInplaceEditorBase
x:Class="WpfApplication1.CustomInplaceEditor"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxschui="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Height="164" Width="226">
<Grid>
<Grid.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Black"/>
</Style>
</Grid.Resources>
<Border Background="#F3BBD2E8" CornerRadius="5"/>
<Grid Margin="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--region #Subject-->
<TextBlock Grid.Row="0" HorizontalAlignment="Left" Text="Subject: "/>
<dxe:TextEdit Margin="0,0,0,4"
Grid.Column="1"
Text="{Binding Subject, UpdateSourceTrigger=PropertyChanged}"/>
<!--endregion #Subject-->
<!--region #Label-->
<TextBlock Grid.Row="1" HorizontalAlignment="Left" Text="Label: "/>
<dxschui:AppointmentLabelEdit
Margin="0,0,0,4"
Grid.Row="1" Grid.Column="1"
Storage="{Binding Storage}"
EditValue="{Binding Label, UpdateSourceTrigger=PropertyChanged}"/>
<!--endregion #Label-->
<!--region #Description-->
<TextBlock Grid.Row="2" HorizontalAlignment="Left" Text="Description: "/>
<dxe:TextEdit Margin="0,0,0,4"
Grid.Row="2" Grid.Column="1"
TextWrapping="Wrap" VerticalContentAlignment="Top"
Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}"/>
<!--endregion #Description-->
<!--Buttons-->
<StackPanel Grid.Row="3" Grid.ColumnSpan="2"
Orientation="Horizontal" HorizontalAlignment="Right">
<Button Name="OK_button"
Width="60" Margin="0,0,4,0"
Content="OK" Click="OK_button_Click" />
<Button Name="Cancel_button"
Width="60"
Content="Cancel" Click="Cancel_button_Click"/>
</StackPanel>
</Grid>
</Grid>
</dxschui:AppointmentInplaceEditorBase>
public partial class CustomInplaceEditor : AppointmentInplaceEditorBase {
public CustomInplaceEditor(SchedulerControl control, Appointment apt)
: base(control, apt) {
InitializeComponent();
}
private void OK_button_Click(object sender, RoutedEventArgs e) {
OnCommitChanges();
}
private void Cancel_button_Click(object sender, RoutedEventArgs e) {
OnRollbackChanges();
}
}
See Also