Wrap Text Silverlight radio button - silverlight-3.0

Is it possible to have the text in a radio button wrap itself? For example, I have a border area to work with that's approximately 350 pixels wide and I want to position some radio buttons in there. I can do that, but when the text is long, I cannot wrap the text.

Try this:
<RadioButton Width="100" >
<RadioButton.Content>
<TextBlock Text="This is some text that is very long" TextWrapping="Wrap" />
</RadioButton.Content>
</RadioButton>

Related

card-footer not stay at the bottom of horizontal card bootstrap

I am using horizontal bootstrap card and I want to align a text at the end of the second column. I tried to use card-footer but it doesn't seems to work example. Is there a way to achieve this.
card-body and card-footer only automatically align themselves properly, and as Bootstrap's example shows when they are directly under the card class. However given your layout, you'd need the col-md-8 to be a flex with column direction.
So add the classes d-flex flex-column to your col-md-8 and your footer will stick to the bottom of the second column. JSFiddle

Angular material how to position mat-sidenav top or bottom

I am new to angular material. From angular material doc i can see it can be positioned 'start' or 'end'.
<div style="border:solid 1px red;">
<mat-sidenav-container>
<mat-sidenav class="sidenav"
position="end" <!-- want to position top or bottom here-->
[opened]="sidenavOption.open"
[mode]="sidenavOption.mode">
Sidenav content
</mat-sidenav>
<ng-content></ng-content>
</mat-sidenav-container>
</div>
I would like to position 'top' or 'bottom'
Can anyone help me how to do this?
Thanks
AFAIK the sidenav as the name suggests can only be present on the right (end) or left (start) side of your page. Even though the material design specifications allow a bottom drawer (here).
As stated here there is no other property than position to specify the position other than left or right.
It seems that you would either need to make your own implementation of such a drawer -But for that you can extend from the material design classes and build upon them- or you could use a MatBottomSheet, which is almost the same, but can only be used as a kind of bottom drawer.

Prevent automatic scrolling for an Editor in Xamarin.Forms.iOS

I have a very simple Xamarin.Forms app. The Xaml is a Grid with one column, and two rows. The first row contains an Entry control. The second row contains a Scrollview, which contains an Editor control (multiline text box). The second row's height is *. The Scrollview VerticalOptions is set to FillAndExpand.
The Editor needs to scroll when it fills up. The first Entry should stay where it is.
On Android the Editor control works as expected, it scrolls when it gets full up. But on iOS, as soon as the keyboard pops up, the Editor scrolls up, taking the cursor up out of sight. It also scrolls up when it only has a few lines of text in it, so they disappear. This behavior occurs on the iPhone simulator, and on a physical device.
I have tried all combinations of verticaloptions on the Scrollview, the grid, and the entry control. Nothing stops the unwanted scrolling.
I can't put a ScrollView round the whole grid because I need that first Entry to stay visible.
I cannot add pictures on this site yet, so here is a link to the layout:
image link
The garish colours are just so I can see where each control begins an ends.
I am using the latest version of everything as of Jan 2016.
<Grid Padding="5,5,5,5" RowSpacing="5" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" BackgroundColor="White" >
<!--One colum-->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!--- 2 rows (0-1). 0=title, 1=body-->
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- row 0 Title -->
<Entry x:Name="txtTitle" Grid.Row="0" Grid.Column="0" BackgroundColor="Gray" TextColor="Black" />
<!-- row 1 Editor -->
<ScrollView Grid.Row="1" Grid.Column="0" BackgroundColor="Red" Padding="5,5,5,5" >
<!--Making the Editor FillAndExpand makes no difference-->
<Editor x:Name="txtBody" Grid.Row="1" Grid.Column="0" BackgroundColor="Olive"/>
<!-- -->
</ScrollView>
</Grid>
Further update. I have found that the Editor control has its own scrolling. So I have removed the ScrollView around it. The problem still persists. Once the text in the Editor has more lines than the height of the Editor, you cannot scroll down to the last line in edit mode. It's fine if you only want to view the text, but as soon as you tap the screen to put it in edit mode, you cannot get to the last row. I have deployed this to an iPhone 4 (as the lowest common denominator) and taken a screen shot. See the 1111111 at the bottom of the green Editor? There is more text below that, but you cannot get to it in edit mode. The same thing happens in the Simulator, and on an iPad 3.
iPhone4 Screenshot
This seems to be a fundamental flaw with Xamarin's Editor control. Please can someone confirm is this being addressed or if there is a workaround?

Hide horizontal scrollbar embedded google spreadsheet

How can I hide the horizontal scrollbar at the bottom of an (iframe) embedded google spreadsheet? If there is no official way, some clever css to cut off the scrollbar would also work.
The horizontal scrollbar will dissapear if you specify the range of columns you want to appear:
<iframe src="https://docs.google.com/spreadsheets/d/1B56....this will change according to your spreadsheet/pubhtml/sheet?headers=false&gid=0&range=A:C" width="300" height="350"></iframe>

SmartGWT - How to have editable and non-editable text together in the same text area?

Please let me know how to approach this problem, I am naive to smartGWT.
The requirement is that:
I have to display a text area which has some pre-populated text.
Part of this pre-populated text should be editable and the part of this pre-populated text should be non-editable.
The editable text should be rendered in black color while the non-editable text should be rendered in gray color.
I am currently using com.smartgwt.client.widgets.form.fields.TextAreaItem class but I am open to change my class if this usecase is supported by some other widget.
Details:
Suppose the below lines displays the upper and lower boundary of my text area.
[Editable text] (This text should be editable and should have black color)
[Non editable text] (This text should be non editable and should have gray color)
[Editable text] (This text should be editable and should have black color)
The TextAreaItem is rendered as a HTML textArea so just good for input not for formatting .
Perhaps you could use the RichTextItem which allow to format a text with different font and attribute.
But it is no quite sure you can customize it (to remove the tool for example) and just play with the events.
I don't think it will be so easy
Do you have a random number of line?
If not you can design your own with a canvasItem including editable element (TextItem), non editable elements (could be TextItem with setDisabled(true) but watch the style)and assign css for the style

Resources