diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:35:25 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:35:25 +0000 |
| commit | 674ca83ba9243a9e95a7568c797668dab6aee26a (patch) | |
| tree | 4a905b3fb1d827665a34d63f67bc5559f8e7235b /Gestor.Application/Componentes/CustomIsReadOnlyControl.cs | |
| download | gestor-674ca83ba9243a9e95a7568c797668dab6aee26a.tar.gz gestor-674ca83ba9243a9e95a7568c797668dab6aee26a.zip | |
feat: upload files
Diffstat (limited to 'Gestor.Application/Componentes/CustomIsReadOnlyControl.cs')
| -rw-r--r-- | Gestor.Application/Componentes/CustomIsReadOnlyControl.cs | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs b/Gestor.Application/Componentes/CustomIsReadOnlyControl.cs new file mode 100644 index 0000000..988f8fc --- /dev/null +++ b/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 |