Telerik Forums
UI for WPF Forum
2 answers
126 views
Hi together,

is there a way to make the FilteringControl resizeable and moveable via user interaction (e.g. via mouse)?

Best Begards
Andreas
Andreas
Top achievements
Rank 1
 answered on 07 Aug 2014
5 answers
387 views
Hi,

i have a Problem with the Bullet List.

How can I set the default row height and the default line spacing from the BulletList in my richtextbox?

my XAML-Code Looks like this:

​<telerik:HtmlDataProvider Name="DataProvider" RichTextBox="{Binding ElementName=radRichTextBox1}" Html="{Binding Antworttext, Mode=TwoWay}">
<telerik:HtmlDataProvider.FormatProvider>
<telerik:HtmlFormatProvider>
<telerik:HtmlFormatProvider.ImportSettings>
<telerik:HtmlImportSettings UseDefaultStylesheetForFontProperties="True" />
</telerik:HtmlFormatProvider.ImportSettings>

</telerik:HtmlFormatProvider>
</telerik:HtmlDataProvider.FormatProvider>
</telerik:HtmlDataProvider>

<telerik:RadRichTextBox Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="5" x:Name="radRichTextBox1" IsReadOnly="true" BorderThickness="0" DocumentChanged="radRichTextBox1_DocumentChanged"
HorizontalScrollBarVisibility="Hidden" HorizontalAlignment="Stretch" IsContextMenuEnabled="true" FontFamily="Arial" FontSize="{DynamicResource FontSizeAnswers_rightColumn}" FontStyle="Normal" FontWeight="Normal" DocumentInheritsDefaultStyleSettings="True"
IsFocusable="False" IsHitTestVisible="False" IsImageMiniToolBarEnabled="False" IsSelectionEnabled="true" IsSelectionMiniToolBarEnabled="false"
IsSpellCheckingEnabled="False" >
<telerik:RadRichTextBox.Resources>
<Style TargetType="{x:Type Paragraph}">
<Setter Property="Padding" Value="0"/>
<Setter Property="LineHeight" Value="200"/>
<Setter Property="Background" Value="Red"/>
</Style>

</telerik:RadRichTextBox.Resources>
</telerik:RadRichTextBox>


Thank you
MANTU
Top achievements
Rank 1
 answered on 07 Aug 2014
7 answers
424 views
I have a GridView with a HierarchyChildTemplate that has a Grid View. I need a context menu in that ChildTemplate GridView that sees things on the View Model. How do I get it to see the viewmodel for the proper binding?

Code:

<telerik:RadGridView Grid.Row="0"
                             x:Name="radGridView"
                             ItemsSource="{Binding Items}"
                             AutoGenerateColumns="False"
                             SelectionMode="Extended"
                             SelectionUnit="FullRow"
                             ShowGroupPanel="False"
                             Margin="25,25,25,25"
                             ui:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding Path=SelectedItems}"
                             AllowDrop="True"
                             IsFilteringAllowed="True">
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition/>
            </telerik:RadGridView.ChildTableDefinitions>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView ItemsSource="{Binding ProjectionTasksLink}"
                                         AutoGenerateColumns="False"
                                         SelectionMode="Extended"
                                         SelectionUnit="FullRow"
                                         ShowGroupPanel="False"        
                                         AllowDrop="True">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Header="Projection"
                                                        UniqueName="Name"
                                                        DataMemberBinding="{Binding}"
                                                        CellTemplate="{StaticResource CellTemplate.TaskName}"
                                                        IsReadOnly="True"/>
                            <telerik:GridViewDataColumn Header="Run Parameter Set"
                                                        UniqueName="RunParametersLink"
                                                        DataMemberBinding="{Binding}"
                                                        CellTemplate="{StaticResource CellTemplate.RunParameterSetName}"
                                                        IsReadOnly="True"/>
                        </telerik:RadGridView.Columns>
                        <telerik:RadGridView.ContextMenu>
                            <ContextMenu>
                                <MenuItem Header="Run Selected Item(s)"
                                         DataContext="{Binding Path=PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
                                         Command="{Binding RunAllSelectedTasksCommand}"
                                         CommandParameter="{Binding Path=PlacementTarget.SelectedContexts, RelativeSource={RelativeSource AncestorType=ContextMenu}, Converter={StaticResource runControllerJobCmdConverter}}">
                                    <MenuItem.Icon>
                                        <Image Source="Images/Run16.png" />
                                    </MenuItem.Icon>
                                </MenuItem>
                            </ContextMenu>
                        </telerik:RadGridView.ContextMenu>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Run Page Name"
                                            UniqueName="Name"
                                            CellTemplate="{StaticResource CellTemplate.RunPageName}"
                                            DataMemberBinding="{Binding}"
                                            IsReadOnly="True"/>
                <telerik:GridViewDataColumn Header="Target Model Object"
                                            UniqueName="AssociatedTargetModelObjectLink"
                                            DataMemberBinding="{Binding}"
                                            CellTemplate="{StaticResource CellTemplate.TargetModelObjectName}"
                                            IsReadOnly="True"/>
                <telerik:GridViewDataColumn Header="InputManager"
                                            UniqueName="AssociatedInputManagerLink"
                                            CellTemplate="{StaticResource CellTemplate.InputManagersList}"
                                            DataMemberBinding="{Binding}"
                                            IsReadOnly="True"/>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Run Selected Item(s)"
                             DataContext="{Binding Path=PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"
                             Command="{Binding RunAllSelectedTasksCommand}"
                             CommandParameter="{Binding Path=PlacementTarget.SelectedContexts, RelativeSource={RelativeSource AncestorType=ContextMenu}, Converter={StaticResource runControllerJobCmdConverter}}">
                        <MenuItem.Icon>
                            <Image Source="Images/Run16.png" />
                        </MenuItem.Icon>
                    </MenuItem>
                </ContextMenu>
            </telerik:RadGridView.ContextMenu>
        </telerik:RadGridView>

The context menu in the parent grid is fine, but the one in the nested grid is not right.

Side question. Is there a better way to do the nested grid thing than the HierachyTemplate? I would like for this to be one grid that does nesting. I tried using 
ChildTableDefinitions, but I can't specify things like columns and what not.

Thanks,
Greg
Princee
Top achievements
Rank 1
 answered on 07 Aug 2014
1 answer
134 views
Hi, I need a column chooser for the grid. Most grids have an optional column chooser accessed via an icon in the top left corner of the grid.

I assume you support this - but how do I turn it on ?

Thanks
Yoan
Telerik team
 answered on 06 Aug 2014
2 answers
460 views
I have a RadListBox with an overrided ItemTemplate that uses a RadComboBox as one of its elements. When the combo box's scroll bar is visible, attempting to scroll triggers the drag process in the RadListBox. When I disable drag and drop completely, I am not able to scroll - it appears that the relevant mouse events are being captured by the RadListBox.

Here is the code for the listbox:

<telerik:RadListBox Name="rlbSpices" QueryContinueDrag="rlbSpices_QueryContinueDrag"  telerik:DragDropManager.AllowDrag="True" AllowDrop="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Grid.Row="1" Grid.Column="1" Margin="5" ItemsSource="{Binding RecipeSpices, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ItemTemplate="{StaticResource SpiceItemTemplate}">
    <telerik:RadListBox.DragVisualProvider>
        <telerik:ScreenshotDragVisualProvider />
    </telerik:RadListBox.DragVisualProvider>
    <telerik:RadListBox.DragDropBehavior>
        <telerik:ListBoxDragDropBehavior AllowReorder="True"  />
    </telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>

Here is the code for the item template:

<DataTemplate x:Key="SpiceItemTemplate">
    <Grid HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="50"/>
            <ColumnDefinition Width="30"/>
            <ColumnDefinition Width="25"/>
        </Grid.ColumnDefinitions>
        <local:IngredientCombobox Loaded="IngredientCombobox_Loaded" PreviewMouseMove="IngredientCombobox_PreviewMouseMove" MouseMove="IngredientCombobox_MouseMove" DropDownOpened="IngredientCombobox_DropDownOpened" DropDownClosed="IngredientCombobox_DropDownClosed" Height="20" VerticalAlignment="Top" Grid.Column="0" SelectedItem="{Binding Spice}"/>
        <xctk:DoubleUpDown Grid.Column="1" Height="20" Width="50" Margin="0,0,0,0" VerticalAlignment="Top" FormatString="F2" Value="{Binding Amount}" Increment=".01"  Maximum="1000.00" />
        <TextBlock Grid.Column="2" Margin="5,0,0,0" Text="{Binding Unit.Name}"/>
        <Button Grid.Column="3" Width="25" Height="25" Name="btnRecipeSpiceDelete" Click="btnRecipeSpiceDelete_Click">X</Button>
    </Grid>
</DataTemplate>


I've tried tracking when a combobox is expanded so that I can disable drag/drop at that time, but there seems to be no way to do that effectively. What is the correct way to handle this issue?
Steven
Top achievements
Rank 1
 answered on 06 Aug 2014
4 answers
85 views
I have a window with a gridview control with an image column. The image column displays PNG files on my local disk.
Once I'm done with this dialog (after ShowDialog()) I need to remove the images again from disk.
Unfortunately Windows tells me that the images are still in use by my process although the dialog has been closed successfully (my application still runs of course).

What do I need to do to be able to remove the PNG files after the dialog has been closed?
There is no dispose method for WPF windows. What cleanup do I need to do in the closed event?

Thanks for your help.

Markus

Yoan
Telerik team
 answered on 06 Aug 2014
1 answer
158 views
Hello, I want to use a RadNumericUpDown control in a WPF application. If I do not give the control a name or x:name everything works as expected. If however I provide a name it throws the error below.

What to do? I need to reference the control.



System.Windows.Markup.XamlParseException occurred
  _HResult=-2146233087
  _message='Set connectionId threw an exception.' Line number '6' and line position '29'.
  HResult=-2146233087
  IsTransient=false
  Message='Set connectionId threw an exception.' Line number '6' and line position '29'.
  Source=PresentationFramework
  LineNumber=6
  LinePosition=29
  StackTrace:
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
  InnerException: System.IO.FileLoadException
       _HResult=-2146234304
       _message=Could not load file or assembly 'Telerik.Windows.Controls.Input, Version=2012.1.326.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
       HResult=-2146234304
       IsTransient=false
       Message=Could not load file or assembly 'Telerik.Windows.Controls.Input, Version=2012.1.326.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
       Source=TemplateNinja.UserControls
       FileName=Telerik.Windows.Controls.Input, Version=2012.1.326.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7
       FusionLog==== Pre-bind state information ===
LOG: DisplayName = Telerik.Windows.Controls.Input, Version=2012.1.326.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7
 (Fully-specified)
LOG: Appbase = file:///C:/Users/sbaldridge/Source/Workspaces/TemplateNinja/TemplateNinja/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : TemplateNinja.UserControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.

Kalin
Telerik team
 answered on 06 Aug 2014
6 answers
332 views
Hi, inside a RadGridView how do I overlay the value on a RadProgressBar control?

So the PercentFilled value below, say 75, will be displayed at 75% on top of the progressbar.

What I have but I can't get it to work:

            <telerik:RadGridView.Columns >
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadProgressBar Minimum="0" Maximum="100" Value="{Binding PercentFilled}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>

Thanks
R
Top achievements
Rank 1
 answered on 06 Aug 2014
1 answer
173 views
Hi

I have a requirement of loading images in a thumbnail rotator and on click of the thumbnail, open the image in bigger size. The user then should be able to edit the image like adding text etc and should be able to save it back to the database in the blob format.

I am successful in loading the images as thumbnails in a RadRotator control, from the database using datasource.
However, could you advise if it's possible to load the clicked image in a new RadImageEditor control in Rotator.ItemClick event. And then save it back to the database when it's edited (cropped, marked, text added etc)

Thanks
Rama
Top achievements
Rank 1
 answered on 06 Aug 2014
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
DataPager
PersistenceFramework
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?