Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CustomField
- {
- [JsonProperty("uid")]
- public Guid uid { get; set; }
- [JsonProperty("name")]
- public string name { get; set; }
- [JsonProperty("type")]
- public CustomFieldType type { get; set; }
- }
- public enum CustomFieldType
- {
- TEXT = 0,
- MULTI_LINE = 1,
- DATETIME = 2,
- ...
- }
- public class CustomFieldValue
- {
- [JsonProperty("uid")]
- public Guid uid { get; set; }
- [JsonProperty("type")]
- public CustomFieldType type { get; set; }
- [JsonProperty("textValue")]
- public string textValue { get; set; }
- [JsonProperty("dateValue")]
- public DateTime dateValue { get; set; }
- ...
- }
- public class BaseModel
- {
- [JsonProperty("uid")]
- public Guid uid { get; set; }
- [JsonProperty("name")]
- public string name { get; set; }
- [JsonProperty("description")]
- public string description { get; set; }
- ...
- [JsonProperty("customFieldValues")]
- public List<CustomFieldValue> customFieldValues { get; set; }
- }
- public class ViewModel : brmViewModelBase
- {
- BaseModel cModel;
- ...
- public string name
- {
- get
- {
- if (isLoaded)
- return Model.name;
- else
- return "";
- }
- set
- {
- if (Model.name != value)
- {
- Model.name = value;
- OnPropertyChanged();
- isModified = true;
- }
- }
- }
- ...
- public BaseModel Model
- {
- get
- {
- return cModel;
- }
- set
- {
- cModel = value;
- OnPropertyChanged();
- OnPropertyChanged(nameof(name));
- ...
- }
- }
- }
- <TextBox x:Name="txtName"
- Text="{x:Bind ViewModel.name, Mode=TwoWay}"
- Style="{StaticResource entryDefault}"
- Header= "Name*"
- PlaceholderText="Enter Name"
- Margin="0,10,0,0"
- Width="800"
- HorizontalAlignment="Left"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement