SyncFusion SfRichTextBoxAdv weird suspensive points while typping - wpf

When typping text in a SfRichTextBox, the current word that I am writting appears incomplette with three points at the end. Once the space bar is pressed, the word appears properly. Is is similar to the TextTrimming property set as "CharacterEllipsis" on a TextBlock control. I would like to avoid it.

Greetings from Syncfusion,
We were able to reproduce the reported issue while using our control inside the TabControlExt when the strip placement is other than top. Please refer the below screenshot.
Clipping issue
If you are facing the above same issue and you are using SfRichTextBoxAdv control inside the TabControlExt with strip placement is other than top, like below code snippet. Make sure you are using latest release version of our product (17.4.0.39). Because, we have fixed similar issues and included in our volume 4 main release which is delivered on last month.
<Grid>
<syncfusion:TabControlExt TabStripPlacement="Left" >
<syncfusion:TabItemExt Header="Support" Height="30">
<syncfusion:SfRichTextBoxAdv LayoutType="Continuous" />
</syncfusion:TabItemExt>
</syncfusion:TabControlExt>
</Grid>
If still you are facing the same issue, please share your code snippet or sample with replication steps to reproduce the issue. Because it will help us to provide you the appropriate solution at the earliest.
For further details, please create a new incident (under your account) from our support website to provide solution quickly. Please find the support website link from below.
https://www.syncfusion.com/support/directtrac/incidents/newincident
Note: I work for Syncfusion

We have placed the control inside a Grid. a piece of code below...
<Grid Grid.Row="0"
Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Margin="0,0,0,5"
Text="Vista previa del documento de texto." />
<Syncfusion:SfRichTextBoxAdv Grid.Row="1"
Grid.Column="1"
Background="LightGray"
DocumentTitle="Hola"
LayoutType="Pages" />
</Grid>

We have tried to reproduce the reported issue with the provided code snippet, but we couldn’t face any clipping issue while typing the text. And we suspect that this issue occurs only on specific application. So, please share your sample application to reproduce the reported issue.
For quick response, please create a new incident (under your account) from our support website to provide solution quickly. Please find the support website link from below.
https://www.syncfusion.com/support/directtrac/incidents/newincident
Note: I work for Syncfusion

Related

Having difficulty using Z-Index in WPF

I've followed some examples trying to layer a rectangle over the WebBrowser object:
Here is the MSDN example link. (I got it to work)
Layers issue using Z-Index
Here is the code I'm trying to get to work:
<Grid>
<Canvas Margin="2,4,0,-450" >
<Rectangle Height="452" Canvas.ZIndex="1000" Name="rectangle1" Stroke="Black" Width="524" Opacity=".5" Fill="#8CBABABA" Canvas.Top="-7" Canvas.Left="-3" />
<WebBrowser Name="mapBrowser" Canvas.ZIndex="999" Margin="5,5,5,5" Height="452" Width="516" Canvas.Top="-11" />
</Canvas>
</Grid>
I'm trying to make the WebBrowser appear grayed out by making the rectangle appear over top of it. I'll also disable it.
Can anybody point to what I'm doing wrong?
I solved this issue by creating a .png image which I placed in the same space as the webbrowser. It looks like a grayed-out version of what first appears in the webbrowser. Then I conditionally hid the webbrowser which makes the image visible. This is the only way I've found to make it work using .Net 4.0.

Want a tool to visualize XAML hierarchy, tried XAMLPadX had problems

I'd like a tool to visualize the Visual Hierarchy of a XAML file - just an outline of what elements are within what other elements.
I downloaded XAMLPadX 4.0 and opened a GridSplitter example file:
<Window x:Class="GridsplitterSample.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="GridSplitter Sample" Height="400" Width="700">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<GridSplitter Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Width="4" Background="Yellow"/>
<TextBlock Grid.Row="0" Grid.Column="0" Margin="0 0 4 0" Background="LightGray">Text Block</TextBlock>
<TextBlock Grid.Row="0" Grid.Column="1" Background="LightGreen">Text Block 2</TextBlock>
</Grid>
</Window>
. . . This example runs and builds fine in Visual Studio 2010 but in XAMLPadX it showed nothing on the main screen and in the Visual Tree window it only expanded as far as the outer Grid element and there was no "+" to expand that any farther to show the inner Grids, TextBlocks or GridSplitter.
XamlPadX came with sample files so I loaded "Red Dragon". It displayed the XAML and a red dragon on the main screen. But now I can't get RID of the red dragon! No matter what else I load that's all I see in the main window and Visual Tree, even though different XAML is loaded in the XAML window. Red Dragon seems to have broken the tool and resrating it seems to make no difference.
So am I doing something wrong or is there a better tool?
Thanks in advance.
If you aren't already familiar than there's no other tool I know of that is nearly as handy as Expression Blend and I know normally it's frowned upon to provide answers that are only a couple sentences. However for working with XAML in WPF/SL Expression Blend is excellent once you get used to it. The Objects / Timeline and visual Properties etc. make dev so much more efficient! If you can't tell, I'm a big fan.
Or if you haven't already done so you can enable the Document Outline window in Visual Studio and it also helps quite a bit with visualizing the structure. Hope this helps.
Could use Snoop. Will attach to any compatible .NET managed app, I think it might even support some Silverlight apps. CTRL+Shift+Mouseover to highlight areas and expose them in the document hierarchy.

Tools\addin's for formating or cleaning up xaml?

I'm guessing these don't exist since I searched around for these but I'm looking for a few tools:
1) A tool that cleans up my xaml so that the properties of elements are consistent through a file. I think enforcing that consistence would make the xaml easier to read. Maybe there could be a hierarchy of what comes first but if not alphabetical might work.
Example before:
TextBox Name="myTextBox1" Grid.Row="3" Grid.Column="1" Margin="4"
TextBox Grid.Column="1" Margin="4" Name="t2" Grid.Row="3"
Example after:
TextBox Name="myTextBox1" Grid.Row="3" Grid.Column="1" Margin="4"
TextBox Name="t2" Grid.Row="3" Grid.Column="1" Margin="4"
(note < /> has been remove from the above since control seem to have issues parsing whe the after section was added)
2) Along the same lines as above, to increase readability, a tool to align properties, so from the above code example similar props would start in the same place.
<TextBox Name="myTextBox1" Grid.Row="3" Grid.Column="1" Margin="4"/>
<TextBox Name="t2" Grid.Row="3" Grid.Column="1" Margin="4"/>
I know VS has default settings for XAML documents so props can be on one line or separate lines so maybe if there was a tool as described in (1) this would not be needed...but it would still be nice if you like your props all on one line.
3) A tool that adds X to the any of the Grid.Row values and Y to any of the Grid.Column values in the selected text. Every time I add a new row\column I have to go manually fix these. From my understanding Expression Blend can help with this but seem excessive to open Blend just to increment some numbers (and just don't grok Blend). Maybe vs2010 with the designer will help but right now I'm on VS08 and Silverlight.
Any one know of any tools to help with this?
Anyone planning to write something like this...I'm looking at you JetBrains and\or DevExpress.
Thanks.
Try out Kaxaml. It has a couple auto-formatting tools like this.

WPF Ribbon ApplicationMenu Alignment on the Right?

When going through a tutorial, the 'ribbon.ApplicationhMenu' always comes up on the left hand of the screen, rather than the right, as it does in Office 2007, Paint (on Windows 7), and WordPad (on Windows 7).
Is there some way to change this?
Thank you
(Example of the issue is here http://cid-a45fe702de180b23.skydrive.live.com/self.aspx/Public/RibbonAnnoyance.png (as a new user, I can only post 1 hyperlink))
Thank you for your reply. Yes, I am using the Ribbon / FluentUI from the Office Team
Sorry, I was unable to log-on to the 'M.Ahrens' account that I create about 22 hours ago (it wasn't an OpenID one, and I am unsure how to log on without an OpenID, so I am now made my self an OpenID).
I was unable to post the link to the tutorial previously (as a new user can only post 1 hyperlink), but here it is:
http://www.renevo.com/blogs/dotnet/archive/2009/02/10/your-first-wpf-ribbon-application.aspx
It doesn't just happen in this tutorial, it happens in every other ribbon app that I make (including Microsoft samples). I have tried the flowing:
*HorizontalAlignment="Right"
*HorizontalContentAlignment="Right"
*FlowDirection="RightToLeft" (makes the ApplicationMenu go to the right, but switches the columns around)
*Default
But it doesn't seem to make a different, the ApplicationMenu is still on the 'left' hand side (unless I maximize the window).
M.Ahrens
+++++++++++++++++++++++++
Edit (added a code sample):
<r:RibbonWindow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
Height="400" Width="400">
<DockPanel>
<r:Ribbon DockPanel.Dock="Top">
<r:Ribbon.ApplicationMenu>
<r:RibbonApplicationMenu>
</r:RibbonApplicationMenu>
</r:Ribbon.ApplicationMenu>
</r:Ribbon>
</DockPanel>
</r:RibbonWindow>
Are you using the WPF Ribbon from the OfficeUI team?
We are using that one and don't get anything happening like that. Possibly post some of the XAML you are using to create the App Menu.
EDIT: Having a look at your code, i suspect the DockPanel is being a bit silly.
This is how we structure out layout to add the ribbon
<r:RibbonWindow x:Class="MyAssembly.Main"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
Title="The Title"
Height="450"
Width="600" >
<Grid x:Name="grdMain">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<r:Ribbon Title="The Title" x:Name="ribbonMain" Grid.Row="0">
<!--Quick Access Toolbar-->
<r:Ribbon.QuickAccessToolBar>
<r:RibbonQuickAccessToolBar>
</r:RibbonQuickAccessToolBar>
</r:Ribbon.QuickAccessToolBar>
<!--Application Menu-->
<r:Ribbon.ApplicationMenu>
<r:RibbonApplicationMenu x:Name="mnuApplication">
<!--App Menu Items-->
<r:RibbonApplicationMenu.Items>
</r:RibbonApplicationMenu.Items>
<!--App Menu Recent Item List-->
<r:RibbonApplicationMenu.RecentItemList>
<StackPanel>
<r:RibbonLabel>Recent Items</r:RibbonLabel>
<r:RibbonSeparator/>
<r:RibbonHighlightingList x:Name="lstRecentItems"/>
</StackPanel>
</r:RibbonApplicationMenu.RecentItemList>
<!--App Menu Footer-->
<r:RibbonApplicationMenu.Footer>
</r:RibbonApplicationMenu.Footer>
</r:RibbonApplicationMenu>
</r:Ribbon.ApplicationMenu>
</r:Ribbon>
<Grid Grid.Row="1">
<!--This is the aread under the ribbon. Place layout things inside of this space-->
</Grid>
</Grid> </r:RibbonWindow> <!--This is closing tag is on this line as SO is being silly-->
As I mentioned, I suspect the DockPanel is being just abit silly, tho it's a bit late (12am) for me to test it right now.
Try copying this code into your XAML and see what happens.
To be frank, I don't trust DockPanels a whole lot, Grids work much better for me :D

wpf visual studio designer won't load user controls

The view below is a container for three user controls, and I started getting this error after refactoring application resources:
Error 295 Could not create an instance of type 'FilterPanel'. C:...\ProjectPickerWindow.xaml
Here is the xaml for the view:
<Window x:Class="Smack.ConstructionAdmin.WpfPresentation.Views.ProjectPicker.ProjectPickerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local ="clr-namespace:Smack.ConstructionAdmin.WpfPresentation.Views.ProjectPicker"
xmlns:res="clr-namespace:Smack.ConstructionAdmin.WpfPresentation"
Background="{DynamicResource {x:Static res:SmackResources.WaveWindowBackground}}"
Title="{Binding Path=DisplayName}" FontFamily="Arial" FontSize="12"
SizeToContent="WidthAndHeight" MinWidth="300"
>
<DockPanel LastChildFill="True">
<local:FilterPanel DockPanel.Dock="Top" DataContext="{Binding}" Padding="3" />
<local:StatusAndButtons DockPanel.Dock="Bottom" DataContext="{Binding}" Margin="3, 7" />
<local:Listing DataContext="{Binding}" Margin="3, 0"/>
</DockPanel>
The app runs fine, and I can undo the refactorings, but I would prefer not to. All of the user controls display fine in their designer windows.
Can someone tell me how to get this to display in the designer?
Cheers,
Berryl
=== ADD'L INFO # Andrew ===
Great general checklist, if not the fix yet.
1) no silent binding errors
2) the designer works great after commenting out the FilterPanel!
3) no noticeable behavior change; all tests past too
4) yeah, I may have not left enough bread crumbs to nail the exact refactor but major ones were:
-- put all converters for the presentation in the own ResourceDic
-- had the FilterPanel reference generic.xaml, which has all mergedResourceDics. It referenced a specific Dic called ListingStyles.xaml, which used to have the converters
As an aside, do any tools help find Resource 'problems' (Snoop, Mole?)? Is there anything like FxCop to find bad practices??
Not yet an answer but some suggestions as there is not enough information to go on without knowing more about the app: (Posted as an answer as I thought it too long for a comment).
These designer only issues are a pain to track down as the root cause is often not specifically related to where the error arises.
This looks as if FilterPanel has a dependency on an object that doesn't yet exist. I have usually found these to be either due to not resolving resource dictionaries correctly or ValueConverter parameters not cast properly to types or initialised at Design time.
Things to try - in ascending order of speed
1) Run the app and look at the Output window to ensure there are no silent binding errors.
2) Narrow down the issue - if you comment out the line that refers to the FilterPanel does the designer work? Often the error crops up in the next line.
3) Although the app appears to run OK has this introduced different behaviours?
4) Step back through your refactorings to find the point at which the problem arose.
I have found Expression Blend to be more tolerant but not necessarily more verbose when it does fall over.
UPDATE:
If you haven't already you may need to add the ThemeInfo custom attribute to your custom controls so they can find their resources - although I think if this mechanism were not working the app would throw an Exception. Anyhow the declaration is
[assembly:ThemeInfo(
//Theme specific resources,
//Generic resources
)]
There is a bunch of valid code/xaml that the VS2K8 designer cannot handle. A lot of them the Blend designer can handle.
If your control needs to be constructed in a special way before it can be 'used', then VS will blow up.
One VS2008 problem is controls from an abstract class. here or here which sounds like what may have happened if you are "refactoring"

Resources