I'm using the LongListMultiSelector of the WP Toolkit to select multiple items. I've written a DataTemplate, which is a little bit complex and have a hight of round about 140px. Now I want to change the position of the Checkbox to VerticalAlignment Top to VerticalAlignment Center. I've tried to change the style of the LongListMultiSelector, but this doesn't work.
Has anybody an idea?
It's the LongListMultiSelector's ItemContainerStyle. Here you find the toolkit's styles. Copy the < Style x:Key="LongListMultiSelectorItemListStyle" TargetType="controls:LongListMultiSelectorItem">, change the x:Key, and change the line which says < CheckBox x:Name="SelectBox" VerticalAlignment="Top" ...
Related
I'm stuck on a code where I need to make Label AutoSize with fixed width. I've tried
Label1.AutoSize = True
Label1.MaximumSize = (FixedWidthInteger,0)
but its still not resizing the length when text if overflow. I've tried to make Panel also AutoSize Enabled to let Label resizing itself but both ways doesn't work. Thank you if you can help me with this please.
Its fixed. I just change the Anchor to all sides of the Panel and its resizing well now.
I have a textbox that I write info to that automatically creates a scroll bar when the screen is filled, and I'd like to scroll to the bottom of it. It seems like what I need to do is set the scrollbar Offset to some vector, but my problem is finding the ScrollViewer.
I can't use FindControl because it's not named anywhere in the xaml, and I can only change a few values using textbox.SetValue
The only way to scroll a TextBox currently is to set the CaretPosition. For example to scroll to the end of the text you could use:
textbox.CaretIndex = int.MaxValue;
For me it works only when I set textbox.CaretIndex to the length of the text. Assuming that property Logs (string type) is binded to textbox I used this
textbox.CaretIndex = Logs.Length
I want to customize TextBlock control to remove its ellipses(three dots at end) for TextTrimming="WordEllipsis". But since TextBlock does not have template property I cannot customize its trimming ellipses. Is there a way to remove those dots in case ellipses shown?
there is no official way to do this. what you could do is abuse TextWrapping property instead.
Remove the trimming and set TextWrappping to WrapWholeWords this will move all remaining text to a next line. if you combine this with a MaxHeight that you hard code to the height of 1 line it should get the same effect.
<TextBlock TextWrapping="WrapWholeWords" MaxHeight="30">
I have a Silverlight application and I use MVVM.
I would like to display or hide a TextBlock, based on another element current width (or window width at least...). The problem is that I currently have 2 texts on each other if I reduce the width of my window so I need want to hide the second textblock in that case...
I'm a beginner and I know how to use a VisibilityConverter with a boolean from my ViewModel, but not like this...
To bind to a property of another element, you would do something like this:
Visibility="{Binding ActualWidth,
ElementName=TheThingWhoseWidthYouAreBindingTo,
Converter={StaticResource WidthToVisibilityConverter}}"
And then create yourself a WidthToVisibilityConverter that takes the width value and returns a Visibility value.
I have used CheckedListBox control in vb.net application.
I have several items as follow, item 1, item 2, item 3........item 100.
Now, i want all these items to arrange into three columns and then appear verticle scrollbar.
But, in CheckedListBox, it appears as horizontally. i want it to appear horizontally for just three columns and then vertical scroll should enable.
Can you please suggest if possible in CheckedListBox control or any other control and if possible then how i would have to set its property to achieve this.
I don't think you can do that in a CheckedListBox....
You could create a FlowLayoutPanel, with a fixed width and add AutoScroll = True.
Then add a number of CheckBox controls to it.
You could have problems regarding column alignment and margins. If that's the case, you can set the checkbox Autosize = False and make them a little larger (in order to contain the text)
Or you can reduce the Height of the checkboxes to reduce spaces (is this what you want?)
eg. Height = 15
Use repeat direction =horizontal and repeat column =3 for checkbox list