summaryrefslogtreecommitdiff
path: root/Codemerx/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Codemerx/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs')
-rw-r--r--Codemerx/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs76
1 files changed, 76 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs b/Codemerx/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs
new file mode 100644
index 0000000..988f8fc
--- /dev/null
+++ b/Codemerx/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Windows;
+
+namespace Gestor.Application.Componentes
+{
+ public class CustomIsReadOnlyControl : CustomItemControl
+ {
+ public readonly static DependencyProperty IsReadOnlyProperty;
+
+ public readonly static DependencyProperty HasValidationProperty;
+
+ public readonly static DependencyProperty TextProperty;
+
+ public readonly static DependencyProperty TextAlignmentProperty;
+
+ public bool HasValidation
+ {
+ get
+ {
+ return (bool)base.GetValue(CustomIsReadOnlyControl.HasValidationProperty);
+ }
+ set
+ {
+ base.SetValue(CustomIsReadOnlyControl.HasValidationProperty, value);
+ }
+ }
+
+ public bool IsReadOnly
+ {
+ get
+ {
+ return (bool)base.GetValue(CustomIsReadOnlyControl.IsReadOnlyProperty);
+ }
+ set
+ {
+ base.SetValue(CustomIsReadOnlyControl.IsReadOnlyProperty, value);
+ }
+ }
+
+ public string Text
+ {
+ get
+ {
+ return (string)base.GetValue(CustomIsReadOnlyControl.TextProperty);
+ }
+ set
+ {
+ base.SetValue(CustomIsReadOnlyControl.TextProperty, value);
+ }
+ }
+
+ public System.Windows.TextAlignment TextAlignment
+ {
+ get
+ {
+ return (System.Windows.TextAlignment)base.GetValue(CustomIsReadOnlyControl.TextAlignmentProperty);
+ }
+ set
+ {
+ base.SetValue(CustomIsReadOnlyControl.TextAlignmentProperty, value);
+ }
+ }
+
+ static CustomIsReadOnlyControl()
+ {
+ CustomIsReadOnlyControl.IsReadOnlyProperty = DependencyProperty.Register("IsReadOnly", typeof(bool), typeof(CustomIsReadOnlyControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ CustomIsReadOnlyControl.HasValidationProperty = DependencyProperty.Register("HasValidation", typeof(bool), typeof(CustomIsReadOnlyControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ CustomIsReadOnlyControl.TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(CustomIsReadOnlyControl), new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ CustomIsReadOnlyControl.TextAlignmentProperty = DependencyProperty.Register("TextAlignment", typeof(System.Windows.TextAlignment), typeof(CustomIsReadOnlyControl), new FrameworkPropertyMetadata((object)System.Windows.TextAlignment.Left, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
+ }
+
+ public CustomIsReadOnlyControl()
+ {
+ }
+ }
+} \ No newline at end of file