Telerik Forums
UI for WPF Forum
1 answer
259 views
Can someone explain how to bind to the SelectedDates property to my view model?

It is not exposed in the XAML designer, why is that?
Kalin
Telerik team
 answered on 11 Jun 2014
7 answers
559 views

Hello,

I am using a RadRichTextBox as HTML editor (I use HtmlDataProvider for that)

In my xaml View, i got :  

                                     - A RadRichTextBoxRibbonUI (with only 6 RadRibbonGroup useful for HTML) and its QuickAccessToolBar
                                     - An HTMLDataProvider and its settings
                                     - A RadRichTextBox 

In my Controller the first call of InitializeComponent();  takes about 8 seconds to load the page (it is rather long)

It's only the first call (after that this is cached). I think, it's not possible to construct all of this under 3 seconds.

So I decided to implement a loader for my users. 

But due to WPF limitations (MTA thread, ...) it's pretty tough to do that. Have you an example of loader? An other solution?

An other issue is on old computers : it takes a long time when typing on keyboard in the RadRichTextBox (I already disable some features to improve that)
Have you a list of all the things which can slow the RadRichTextBox typing?


Features : 

1) How to draw a line (<hr>) in an HTML Editor ? I didn't found any buttons in the Ribbon to do that 

2) How to open an HTML document with relative path image? Images are considered as bad images


Regards,

 





Mihail
Telerik team
 answered on 11 Jun 2014
3 answers
312 views
I added a 2nd TextBlock to DataTemplate for my RadLegeng on my RadCartesianChart:

<telerik:RadLegend.ItemTemplate>
    <DataTemplate>
        <Border BorderThickness="0" BorderBrush="Transparent" Margin="10,2,5,0" Padding="0,4,0,0" >
            <Grid>
                <TextBlock Text="{Binding Percent}" Foreground="White" Margin="0,0,0,0" FontSize="13" FontWeight="Normal" Width="35" HorizontalAlignment="Right" VerticalAlignment="Center" />
                <TextBlock Text="{Binding Title}" Foreground="White" Margin="18,0,0,0" FontSize="13" FontWeight="Normal" HorizontalAlignment="Left" VerticalAlignment="Center" />
                <Path Width="auto" Height="auto" Stroke="White" StrokeThickness="1" Fill="{Binding MarkerFill}" HorizontalAlignment="Left" VerticalAlignment="Center">
                    <Path.Data>
                        <Binding Path="ActualMarkerGeometry" RelativeSource="{RelativeSource AncestorType=telerik:LegendItemControl}" />
                    </Path.Data>
                </Path>
            </Grid>
        </Border>
    </DataTemplate>
</telerik:RadLegend.ItemTemplate>
 
I would like to add custom attribute to bind (Percent) to said 2nd TextBlock through binding and with named declaration of LegendItems:

<telerik:RadLegend.Items>
    <telerik:LegendItemCollection>
        <telerik:LegendItem MarkerFill="#FFF0F8FF" MarkerStroke="White" Title="< 5" x:Name="rl_0to5s" />
        <telerik:LegendItem MarkerFill="#FF00B000" MarkerStroke="White" Title="6 - 10" x:Name="rl_6to10s" />
        <telerik:LegendItem MarkerFill="#FFFFFF00" MarkerStroke="White" Title="11 - 20" x:Name="rl_11to20s" />
        <telerik:LegendItem MarkerFill="#FFFFA83E" MarkerStroke="White" Title="21 - 30" x:Name="rl_21to30s" />
        <telerik:LegendItem MarkerFill="#FFFF2020" MarkerStroke="White" Title="31 >" x:Name="rl_31s" />
    </telerik:LegendItemCollection>
</telerik:RadLegend.Items>

Through searching, I wasn't sure how/if I can add on a new attribute to the LegendItem schema for the custom binding.

What am I missing? Any help or direction would be appreciated.
Petar Marchev
Telerik team
 answered on 11 Jun 2014
3 answers
397 views
DataConext binding for my RadContextMenu is being ignored. My menu is defined like this:

<UserControl.Resources>
    <telerik:RadContextMenu x:Key="LimbContextMenu" DataContext="{Binding SelectedLimb}" >
        <telerik:RadMenuItem Header="Expand" Command="{Binding ExpandItemCommand}" />
        <telerik:RadMenuItem Header="Expand to book" Command="{Binding ExpandToBookCommand}" />
        <telerik:RadMenuItem Header="Collapse" Command="{Binding CollapseItemCommand}" />
        <telerik:RadMenuItem Header="Collapse all" Command="{Binding CollapseAllCommand}" />
        <telerik:RadMenuItem Header="Jump to home" Command="{Binding JumpToHomeCommand}"
                             Visibility="{Binding JumpToHomeCommand.IsSupported, Converter={StaticResource BooleanToVisibilityConverter}}"/>
    </telerik:RadContextMenu>
</UserControl.Resources>


It works if I define it like this:
<UserControl.Resources>
    <telerik:RadContextMenu x:Key="LimbContextMenu"   >
      <telerik:RadContextMenu DataContext="{Binding SelectedLimb}">
        <telerik:RadMenuItem Header="Expand" Command="{Binding ExpandItemCommand}" />
        <telerik:RadMenuItem Header="Expand to book" Command="{Binding ExpandToBookCommand}" />
        <telerik:RadMenuItem Header="Collapse" Command="{Binding CollapseItemCommand}" />
        <telerik:RadMenuItem Header="Collapse all" Command="{Binding CollapseAllCommand}" />
        <telerik:RadMenuItem Header="Jump to home" Command="{Binding JumpToHomeCommand}"
                             Visibility="{Binding JumpToHomeCommand.IsSupported, Converter={StaticResource BooleanToVisibilityConverter}}"/>
      </telerik:RadContextMenu>
    </telerik:RadContextMenu>
</UserControl.Resources>

But this version displays a menu within a menu.

How can I get DataConext assigned on the outer menu?
Mahdi
Top achievements
Rank 1
 answered on 11 Jun 2014
5 answers
588 views
Hi,

how to edit the content or text in radlistiem at runtime?

Thanks.....
Vladi
Telerik team
 answered on 11 Jun 2014
7 answers
992 views
Hi!

Is it possible to style the BusyIndicator as a regular progressbar with progress indicator and a custom text under it?
Even better if I could style it as a circular progressbar with custom text under it.

For now I only manage to change the color of the spinning wheel.

Regards
Odne Roev
Masha
Telerik team
 answered on 11 Jun 2014
3 answers
170 views
I have the AutoExpandItems property set to true on my RadTreeListView and it works great on the initial load. However after I change the RadObservableCollection it does not properly autoexpand and only some rows show up until I force a refresh on the screen.
My two use cases are
Changing or deleting an object in the observable collection,
Clearing the collection and then calling AddRange.

Let me know if this is unclear or you need more information.
Thank you
Nick
Telerik team
 answered on 11 Jun 2014
1 answer
202 views
Hi,

I am having a problem getting the column totals updating after a cell has been edited in a RadGridView.
The columns are all (bar one) generated at runtime in the code behind (not MVVM).

My XAML;

<telerik:RadGridView   Margin="6" 
                                                   AutoGenerateColumns="False"
   x:Name="dgProducts" 
                                                   RowIndicatorVisibility="Collapsed"
   SelectionUnit="Cell" 
                                                   IsSynchronizedWithCurrentItem="True"
   VerticalGridLinesBrush="#CCC"
   HorizontalGridLinesBrush="#CCC" 
                                                   CanUserInsertRows="False"
   CanUserResizeRows="False" 
                                                   CanUserDeleteRows="False"
   ItemsSource="{Binding PromotionVolumes}" 
                                                   RowHeight="25"
   IsFilteringAllowed="False" 
                                                   ShowGroupPanel="False"
   IsReadOnly="{Binding CurrentPromotion.IsReadOnly}" 
                                                   ScrollMode="RealTime"
                                                   Loaded="dgProducts_Loaded"
   telerik:StyleManager.Theme="Transparent" 
                                                   CanUserResizeColumns="True" 
                                                   ShowColumnFooters="True" 
                                                   CellEditEnded="dgProducts_CellEditEnded"
                                                   CanUserFreezeColumns="False"
                                                   >
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn Header="Product Name"
                                        DataMemberBinding="{Binding Path=Product.DisplayName}"
                                       Width="170" IsReadOnly="True">
                                        <telerik:GridViewDataColumn.AggregateFunctions>
                                            <telerik:CountFunction Caption="Count: " />
                                        </telerik:GridViewDataColumn.AggregateFunctions>
                                    </telerik:GridViewDataColumn>
                                     
                                </telerik:RadGridView.Columns>


I generate the columns, one for each item in an array of data;

          var b = new Binding(string.Format("Measures[{0}].RawValue", i));
                   var column = new GridViewDataColumn
                       {
                           DisplayIndex = i + existingColumnCount,
                           UniqueName = (i + existingColumnCount).ToString(),
                           Header = measures[i].Name,
                           DataMemberBinding = new Binding(string.Format("Item[{0}].Value", i)),
                           MinWidth = 90,
                           IsReadOnlyBinding = new Binding(string.Format("Item[{0}].IsReadOnly", i)),
                           Tag = new Binding(string.Format("Item[{0}].RawValue", i))
                       };

                   if (measures[i].IsCalculate)
                   {
                       column.DataMemberBinding.Mode = BindingMode.TwoWay;
                       column.DataMemberBinding.UpdateSourceTrigger = UpdateSourceTrigger.Default;

                       var sf = new SumFunction() { Caption = "", SourceField = b.Path.Path, SourceFieldType = typeof(decimal), ResultFormatString = "{0:N0}" };
                       column.AggregateFunctions.Add(sf);
                       column.AggregateFunctions.Add(aggregate);
                   }

                   grid.Columns.Add(column);


When cell editing happens I call;

      private void dgProducts_CellEditEnded(object sender, GridViewCellEditEndedEventArgs e)
       {
           this.dgProducts.Items.CommitEdit();
           this.dgProducts.CalculateAggregates();
       }



Ordering the grid has no effect on the footer totals either.

I have seen other posts on the forums going back to 2009 and apparently this has been fixed?
What am I missing?


cheers
craig

Nick
Telerik team
 answered on 11 Jun 2014
1 answer
100 views
Hi,

we add some custom connections to our shapes.

var outConnector = new InOutConnector() { Offset = new Point(0.5, 1), Direction = InOutConnector.eDirection.drOut, Name="StartConncetor"};                   
NewShape.Connectors.Add(outConnector);
NewShape.UseDefaultConnectors = false;

Works fine, but how do i edit the TargetCapType in here?

Thanks a lot
Best Regards
Rene
Petar Mladenov
Telerik team
 answered on 11 Jun 2014
3 answers
214 views
Hi,

we add a custom tab to the settings pane. This Tab is placed behind all standard tabs. Is
it possible to move the custom tab to first position or die select this tab on opening the
settings pane?

See attached pic!

Thanks
Regards
Rene
Petar Mladenov
Telerik team
 answered on 11 Jun 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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?