Issue with Slider and SettingsCard

Themes, Shared, and Core Libraries for Avalonia Forum

Posted 11 days ago by Grzegorz Z
Avatar

the slider placed inside the actipro:SettingsCard is not functioning properly. Only the middle part of the slider is visible, and it's not possible to change its value.

[Modified 11 days ago]

Comments (2)

Posted 11 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi,

I'm sorry to hear you are having trouble using the slider in a SettingsCard.  Our Sample Browser includes some examples that include a slider and I'm not seeing any issues there.

If you run our Sample Browser and select the Fundamentals product, you should see a "Settings" sample.  Within that sample, the "Sample Gallery" at the top and the "Sample: Sounds Options" sample at the bottom both use sliders, and everything appears to work correctly even when the card is wrapped due to a narrow view.

Here's an example of the usage for one of them:

<actipro:SettingsCard Header="Volume">
	<StackPanel Orientation="Horizontal">
		<Button Classes="theme-subtle" ToolTip.Tip="Mute">
			<PathIcon Data="..." />
		</Button>
		<TextBlock Text="..." Width="30" TextAlignment="Right" Margin="5,0" VerticalAlignment="Center" />
		<Slider Width="200" Minimum="0" Maximum="100" Value="80" TickFrequency="1" IsSnapToTickEnabled="True" VerticalAlignment="Center" />
	</StackPanel>
</actipro:SettingsCard>

A slider control tends to fill the space available to it, so you might need to explicitly set a width on the control to get the layout you want.

If you are still having issues with slider in a SettingsCard, can you please paste some sample code of how you are using it so that we can try to reproduce what you are seeing?


Actipro Software Support

Answer - Posted 8 days ago by Grzegorz Z
Avatar

The problem was that I didn't have the Width property set. In this configuration, Slided worked outside of SettingsCard but in SettingsCard it only displayed a "dot"
Thanks for your help.

Add Comment

Please log in to a validated account to post comments.