Telerik Forums
UI for WPF Forum
2 answers
254 views
Hi there,

When I place a readonly RadRichTextBoxes as template inside a RadCarousel and the focus is on the RadRichTextBox, the scroll wheel scrolls RadCarousel instead of the content inside the RadRichTextBox.  When I put a FlowDocumentViewer in place of the RadRichTextBox,  the scroll wheel scrolls correctly.  Is there a workaround for this?

Thanks
Haifeng 
Haifeng
Top achievements
Rank 1
 answered on 18 Oct 2011
2 answers
318 views
I'm using the new DragDropManager and trying to stay as close to the standard Windows/WPF approach as much as possible.  Most of the examples here use the RadDragAndDropManager, and I haven't been able to find examples using the new approach.

I have a form with 2 grids (i.e. RadGridView).  There are 2 possible drag/drop scenarios:

Scenario 1. Drag a row from the left grid, and drop onto a row in the right grid, in order to create an association.  In this scenario I need to determine how to  Provide a visual indicator of the drop target row.  This could be achieved by displaying the default mouse-hover highlight on a row, which seems to be turned off during drag/drop.  Is there a way to selectively turn this on and off from within the DragEnter and DragLeave events?

Scenario 2. Use drag/drop to reorder rows within either grid.   In this scenario I need to determine how to display a visual indicator of where the dragged row will be moved to, via an indicator line between the rows.  I notice that the RadTreeListView contains a nice template for this.  I can use the RadTreeListView instead of the RadGridView to take advantage of this.  However this indicator seems to be always on or off based on the IsDragDropEnabled property.  Can this template be toggled on/off from within DragEnter and DragLeave events?  Also how can I determine if the drop point is before or after the target row.

You'll notice that the right grid handles both scenarios, depending on the drag source.  Here is the DragOver handler which provides feedback on what effect (if any) the drop would have.  

private static void OnRightGridDragOver(object sender, DragEventArgs e)
{
            e.Effects = DragDropEffects.None;

            GridViewRow row = FindVisualParent<GridViewRow>(e.OriginalSource as UIElement);
            Attribute attribute = row == null ? null : row.Item as Attribute;
            IDataObject dataObject = (IDataObject)e.Data;

            if (dataObject.GetDataPresent(typeof(Field)))
            {
                if (attribute != null && attribute.Children.Count == 0)
                {
                    e.Effects = DragDropEffects.Link;
                }
            }
            else if (dataObject.GetDataPresent(typeof(Attribute)))
            {
                e.Effects = DragDropEffects.Move;
            }
            e.Handled = true;
}


Also I notice that unlike the RadDragAndDropManager, the new DragDropManager doesn't seem to support auto scrolling of a list. How would that be handled?

Thanks for your help.
Jeff
Top achievements
Rank 1
 answered on 18 Oct 2011
2 answers
177 views

Hi,

 

I have a gridview that is themed with Telerik Windows 7 theme, which is the general theme of the application and gets set at load time.  I want to add another grid in the Row Details section, however I want this nested grid to have a different theme for clarity (office black, or the white theme from the WPF Telerik examples).  Unfortunately, the nested gridview always take the same theme as the parent one.  I have tried to set the style differently, but it didn’t work.

 

 

<Style x:Key="RowDetailGridViewStyle" TargetType="{x:Type Controls:RmpReadOnlyGridView}"  BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Office_SilverTheme, ElementType=telerik:RadGridView}}">


 

Any suggestion what I should do?

 

Regards

Perlom
Top achievements
Rank 1
 answered on 18 Oct 2011
2 answers
186 views
I'm trying to modify the existing Docking.xaml theme to put the close button on the document tab instead of the tabstrip.  The StyleManager seems to accepts the theme (GetTheme returns my theme); however the display still reflects the original Office_BlackTheme with the button on the tabstrip and not on the document tab.  I've included the project, and code snippets of how I use it.

Xaml:
<telerik:RadDocking x:Name="radDock">
    <telerik:RadDocking.DocumentHost>
        <telerik:RadSplitContainer>
            <telerik:RadPaneGroup>
                <telerik:RadDocumentPane Header="Document 1"
                                         Title="Document 1" />
                <telerik:RadDocumentPane Header="Document 2"
                                         Title="Document 2" />
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking.DocumentHost>
</telerik:RadDocking>

Code-behind:
StyleManager.SetTheme(radDock, new OfficeBlack_Docking());

Sample Theme Project


If anyone can help it would be greatly appreciated.  I am evaluating the product for purchase by my company and my trial period has expired, so this is my only recourse for resolution.

Thanks in advance,
Steve
Thomas
Top achievements
Rank 1
 answered on 18 Oct 2011
1 answer
129 views
Here's my situation (simplified):  I want to bind a collection of user controls to a combo box, but I only want to see the Name of the user controls displayed in the list and displayed as the selected item.

So I have essentially done the following in code: 
var collection = new ObservableCollection<MyUserControl>();
// Add some items to collection here
myRadComboBox.ItemsSource = collection;

And my XAML looks something like the following:
<telerik:RadComboBox SelectionBoxTemplate="{StaticResource MyUserControlDataTemplate}" ItemTemplate="{StaticResource MyUserControlDataTemplate}" />

With the static resource defined as...
<DataTemplate x:Key="MyUserControlDataTemplate" >
    <TextBlock Text="{Binding Name}"/>
</DataTemplate>

And when I run the app, and select an item from the drop down, the visual content of the user control is what shows up in the selection box -- not the name.  It appears that when the data bound to ItemsSource is a collection of UserControls, the specified ItemTemplate will be honored, but not the SelectionBoxTemplate.  I have tried to simplify this as much as possible, but I just cannot get it to work.

Fortunately, when I set the ItemsSource property of my RadComboBox to a collection of some other object which had a "Name" property (without making any other changes to the XAML), I got exactly what I expected to see -- the content of the object's Name property showed up in the selection box.

Please tell me that what I'm seeing is not the expected behavior when binding to a collection of user controls!
Yana
Telerik team
 answered on 18 Oct 2011
1 answer
320 views
Hi,

My requirement is to set the visibility of RadTreeViewItem. For this sample shared at the http://www.telerik.com/community/forums/wpf/treeview/radtreeviewitem-visibility.aspx post helped me. I modified this sample to incorporate my requirement. I added one more property in BusinessItem for Visibility and bind it with the RadTreeViewItem. But problem is that RadTreeViewItem shows expander button (on left side) even if all its children are set to Collapsed.
I also need to hide expander button for a RadTreeViewItem if all its children are collapsed.


Thanks and Regards,
Bala,
Petar Mladenov
Telerik team
 answered on 18 Oct 2011
1 answer
90 views
Hello,

Is it possible to disable spelling check in print document?

I prepare data by RadDocument and assign to RadRichTextBox(RadRichTextBox.1Document).
and then give it to print.

now i select Cute PDF Writer rather then selecting Printer.

It gives Rad under line(spel error) in a some of content.


Interesting thing is that it gives on some of pages only. i.e. page no. 4,7,9 etc....

Help me!!

Thanks in advance!!
Iva Toteva
Telerik team
 answered on 18 Oct 2011
1 answer
99 views
I have an InformationLayer that contains points through a LocationCollection property in a view model. When I call the Clear() method on the LocationCollection, the lines on the map don't go away (even if I zoom in or out). My InformationLayer XAML looks like the following. As mentioned, MyPolyline is a LocationCollection:

<telerik:InformationLayer>
    <telerik:MapPolyline Points="{Binding MyPolyline}" Fill="Transparent" Stroke="Teal" StrokeThickness="1" />
</telerik:InformationLayer>

It appears I'm running version 2011.2.920.40. I have confirmed the MyPolyline.Count property is 0 after calling the Clear() method, but as mentioned, the lines on the map don't go away.
Andrey
Telerik team
 answered on 18 Oct 2011
1 answer
232 views
Based on a recent response, I now understand that you use the WPF Image class for rendering the underlying image specified in the UriImageProvider. However, on large images I run into performance issues. Normally, I can use something like: 

RenderOptions.SetBitmapScalingMode(oImage, BitmapScalingMode.LowQuality)

But I am not sure how to do this when working with the UriImageProvider.

Thanks,
Seth

Andrey
Telerik team
 answered on 18 Oct 2011
3 answers
172 views
when a gridview's vertical scrollbar is visible, if you just scroll to the bottom and clicked some grouping headers to collapse or expand the group as you will, after clicked some times, there would be a blank margin bettwen the header row and the first group, sometimes the grouping indicator(the triangle shape) also in wrong status.
Vera
Telerik team
 answered on 18 Oct 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?