how can I create some blank space at the end of a LongListSelector. When I scroll to the very end I am unable to clearly read the last item.
When I use margin the LLS automatically gets smaller. So that does not suite it.
Image
Use an empty control as ListFooter. For example:
<phone:LongListSelector.ListFooter>
<StackPanel Height="50"></StackPanel>
</phone:LongListSelector.ListFooter>
Related
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 have a RDLC Report with a Tablix. The Tablix has a Row bound to a DataSet. The Row has a Textbox with a width of 400px.
If you get a long string with spaces from the DataSet, it will behave as expected and break the string in new lines, making the textbox grow vertically. The problem happens when you get a long string without spaces from the DataSet, the string doesn't break when it reaches the end of the textbox. Instead, the textbox will grow horizontally to fit the string.
How can I break the string and prevent the Textbox from growing horizontally?
After consulting How to maintain long text inside RDLC report column ?
Counting the characters doesn't solve the problem: the data is coming from a database, so it can be virtually anything. And since I'm not using a console font, the size of the letters will not be the same, so the number of '#' that fit in a space is not the same number of 'i'.
CanGrow Property is bound to the TextBox: So even though you can select a column and set CanGrow to true, it will not set the Column itself to stop growing horizontally, it will just set all selected Textboxes 'CanGrow' property to False.
CanGrow Property only prevent the row from growing vertically: Even if you click on a Column. CanGrow Property only affects Height.
I've found the solution by myself. The RDLC report accepts HTML as Expression, so all you need to do is:
Set a div with a fixed width inside the expression.
Set the MarkupType as HTML
See how the report code changes:
Before:
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!TextoCliente.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
After:
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>="<div style='width:400px'>" & Fields!TextoCliente.Value & "</div>"</Value>
<MarkupType>HTML</MarkupType>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
You can set the Expression in the Designer viewer to avoid having to deal with the replacement of '<' with '<', in that mode, you can just type <.
Just in case anyone else finds this, there's a new answer in the possible duplicate link (How to maintain long text inside RDLC report column ?) that appears to be actually correct, and simpler than the accepted answer here or there.
https://stackoverflow.com/a/47495098/793387
I've decided to add pictures in the answer to help explain exactly what needs to happen.
I'll follow the steps from the MSDN tutorial: Change Row Height or Column Width (Report Builder and SSRS) to first show how to set a fixed height and then show how to do the same thing to set a fixed width.
To prevent a row from automatically expanding vertically
In Design view, click anywhere in the tablix data region to select
it. Gray row handles appear on the outside border of the tablix data region.
Click the row handle to select the row.
In the Properties pane, set CanGrow to False.
To prevent a column from automatically expanding horizontally
In Design view, click anywhere in the tablix data region to select
it. Gray column handles appear on the outside border of the tablix data region.
Click the column handle to select the column.
In the Properties pane, set CanGrow to False.
I sincerely hope this is detailed enough.
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">
Is it possible to have a report with flexible text width and height? I sometimes have two words in this text and some times hundreds. I want to have small text for the first and big text for the second. How do I do that?
I would advise you to set a your text box size to what you think is optimum and use the CanShrink and CanGrow properties (tap the text box and then open the properties windows and you can find them there).
The CanGrow property indicates whether the size of the text box can increase vertically according to its content. Similarly, CanShrink decreases the height of the text box according to its content. Here is a link for better understanding these two properties.
Use the Detail_Format event.
It fires before each line, and you can change the formatting based on the length of the text.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(Field1) < 10 Then
txtField1.FontSize = 18
Else
txtField1.FontSize = 12
End If
End Sub
I am using Silveright 4. I have created a xaml page which has an Infragistics XamGrid. The grid has a column called "status" which has 3 values as: completes, started and ongoing. I want to add an image beside the content in the status column from code behind.
I have done something like this:
XamGrid1.columns[2].key
but this returs me the column name but not the content. how can i access the content the the column.. please suggest
Yes.. I want to put a if else condition on the content of the column. suppose the value is "start" then it shoud have a red flag beside it. and if it has a value as "completed" then it should have a green flag.. something like this i want to do.
To have an image in the grid cell you will need to either use a Template Columns or a create your own custom column.
If you use a Template Column, you would add the image to the template and you should then be able to use a binding to the value with a converter to get the correct image in the cell. Refer to Create a Template Column in the help for how to create a Template Column.
If you wish to create a custom column, then you would follow the approach that Devin Rader blogged about in his post titled Creating Custom Columns for the xamGrid.
Here is the a sample of the Template Column and the link to the xamGrid doc. In the Converter is where it chooses the image. the converter will return an image if true and if null or false it will return null.
http://help.infragistics.com/NetAdvantage/Silverlight/Current/CLR4.0/?page=xamGrid_Create_a_Template_Column.html
<ig:TemplateColumn Key="ISFAVORITE"
Width="auto"
HeaderText="Favorite">
<ig:TemplateColumn.ItemTemplate>
<DataTemplate>
<Image HorizontalAlignment="Center" Source="{Binding ISFAVORITE, Converter={StaticResource selectFavImageConverter}}" />
</DataTemplate>
</ig:TemplateColumn.ItemTemplate>
</ig:TemplateColumn>