View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001714 | NoesisGUI | C# SDK | public | 2020-06-09 11:16 | 2020-08-11 19:18 |
Reporter | ck_russ | Assigned To | sfernandez | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.0.2 | ||||
Target Version | 3.0.5 | Fixed in Version | 3.0.5 | ||
Summary | 0001714: Default display for a databound enum in XAML is its numeric value instead of its string value | ||||
Description | This is an inconsistency between WPF and Noesis which can result in some unexpected output in cases where enums are directly output. | ||||
Tags | xaml | ||||
Platform | Any | ||||
Can you provide a test sample where you can reproduce this? I tried with the following code and xaml and it shows the string value of the enum: <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <TextBlock Text="{Binding State}" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> public enum EnumState { First, Second, Third } public class EnumViewModel { public EnumState State { get; set; } } public class EnumDisplayBehavior : MonoBehaviour { void Start() { NoesisView view = GetComponent<NoesisView>(); view.Content.DataContext = new EnumViewModel { State = EnumState.Second }; } } |
|
It does seem to work with TextBlocks. The problem appears in other controls: <Grid> <StackPanel> <Button Content="{Binding State}"/> <ContentControl Content="{Binding State}"/> <TextBlock Text="{Binding State}"/> <TextBox Text="{Binding State,Mode=OneTime}"/> </StackPanel> </Grid> In WPF this results in: Second Second Second Second In Noesis this results in: 1 1 Second [*no value displayed*] |
|
Thanks for the repro steps. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-06-09 11:16 | ck_russ | New Issue | |
2020-06-09 11:16 | ck_russ | Tag Attached: xaml | |
2020-06-09 11:17 | ck_russ | Description Updated | View Revisions |
2020-07-27 11:55 | sfernandez | Assigned To | => sfernandez |
2020-07-27 11:55 | sfernandez | Status | new => assigned |
2020-07-27 11:55 | sfernandez | Product Version | 3.0 => 3.0.2 |
2020-07-27 11:55 | sfernandez | Target Version | => 3.0.4 |
2020-07-27 16:45 | sfernandez | Status | assigned => feedback |
2020-07-27 16:45 | sfernandez | Note Added: 0006543 | |
2020-07-29 08:56 | ck_russ | Note Added: 0006545 | |
2020-07-29 08:56 | ck_russ | Status | feedback => assigned |
2020-07-29 11:34 | sfernandez | Note Added: 0006546 | |
2020-08-02 10:56 | jsantos | Target Version | 3.0.4 => 3.0.5 |
2020-08-11 19:18 | sfernandez | Status | assigned => resolved |
2020-08-11 19:18 | sfernandez | Resolution | open => fixed |
2020-08-11 19:18 | sfernandez | Fixed in Version | => 3.0.5 |