Some control properties are not updated in real time as they are set? Version: 0.10.0-preview5
See original GitHub issueI just have cloned Slider -> SliderEx just to expose thumb with public getter, don’t know if i can get it by code but:
<uc:SliderEx
Grid.Column="2"
Name="Layer.Navigation.Slider"
Minimum="0"
Maximum="{Binding SliderMaximumValue}"
Ticks="{Binding SliderMaximumValue}"
Value="{Binding ActualLayer}"
TickFrequency="1"
TickPlacement="Outside"
SmallChange="1"
LargeChange="10"
IsSnapToTickEnabled="True"
Margin="0,5,0,5"
HorizontalAlignment="Right"
Orientation="Vertical"/>
public uint ActualLayer
{
get => _actualLayer;
set
{
if (!SetProperty(ref _actualLayer, value)) return;
OnPropertyChanged(nameof(CanGoDown));
OnPropertyChanged(nameof(CanGoUp));
OnPropertyChanged(nameof(ActualLayerTooltip));
OnPropertyChanged(nameof(LayerNavigationTooltipMargin));
OnPropertyChanged(nameof(LayerPixelCountStr));
OnPropertyChanged(nameof(LayerBoundsStr));
ShowLayer();
}
}
public Thickness LayerNavigationTooltipMargin
{
get
{
double top = 0;
if (LayerSlider?.Track != null)
{
double trackerPos = LayerSlider.Track.Thumb.Bounds.Height / 2 + LayerSlider.Track.Thumb.Bounds.Top;
double halfTooltipHeight = LayerNavigationTooltipBorder.Bounds.Height / 2;
top = (trackerPos - halfTooltipHeight).Clamp(0,
LayerSlider.Bounds.Height - LayerNavigationTooltipBorder.Bounds.Height);
}
return new Thickness(
0,
top,
5,
0);
}
}
Video of effect: https://youtu.be/4fbsOdm_SF4
Things i tried without success:
LayerSlider.InvalidateArrange();
LayerSlider.Track.InvalidateArrange();
LayerSlider.Track.Thumb.InvalidateArrange();
// Subscribe slider Value propertychanged and call OnPropertyChanged(nameof(LayerNavigationTooltipMargin));
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
User Control DependencyProperties not updating because ...
And the Setting class throws the PropertyChanged event when its value changes. The viewModel has a SelectedDevice property and its set as ...
Read more >Controls properties not updating (from UpdateContext variable ...
I am having problems with Controls properties (Titles, Dropdowns, Galleries, ...) not updating when a record with large amount of data is ...
Read more >Changelog | XR Interaction Toolkit | 2.0.4
These settings are stored within a new Assets/XRI folder by default. Added a Select Mode property to Interactables that controls the number of...
Read more >Solved: how to change properties for some controls in runtime
Problem I have I don't know which reference to connect to property node in case the control in for loop is not a...
Read more >UIControl Properties
The uicontrol function creates a user interface control and sets any required properties before displaying it. By changing property values, you can modify ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sn4k3 you can go through this tutorial without using reactiveui. Also you can look at this answer and this project. MVP and MVVM are friends with each other, so there is an MVPVM approach and it is very good for winforms
Yeah, I think Render has it’s own thread in 11.0, so it’s expected that the event must be redirected to the UIThread.