on a xaml UserComponent i have the following DataTemplate
<Border Margin="0,0,0,0" Padding="0,0,0,0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="content"
which maps to a particular grid column of a GridControl through a custom template selector.
When that particular column is resized on the Grid, the entire column content flickers, and the string contained on the ContentPresenter part of the DataTemplate disappear randomly (well this happen even if the DataTemplate contains only the ContentPresenter part) ... is this some kind of "i should use Double Buffering" thing ? or what kind of workaround can i use to avoid thie behavior ?
I am afraid the code you provided is not enough for us. I do not quite understand from your post where this template is used and under which conditions the problem occurs. It would be great if we can reproduce this issue locally and examine it in greater detail. Would you please provide us with a small sample project where the issue is reproduced on your side, so that we can try it here?
I have researched your sample, and found that the approach you are using is incorrect. The problem is caused by the fact that you are using the view's DefaultDataRowTemplate, which is designed for templating rows, as a cell template. I am not sure why you are using this approach. Could you please clarify the expected behavior in greater detail? Anyway, the easiest way to resolve the problem is to change the xaml as shown below:
<Border Margin="0,0,0,0" Padding="0,0,0,0" Background="Blue"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="content" Content="String contenuto" </ContentPresenter> </Border>
Please let me know if this solution meets your requirements.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.