Telerik Forums
UI for WPF Forum
5 answers
144 views
Hi,
I'm using the DataFilter control placed in a ToolBar (in unbound mode (if relevant)).
<ToolBarTray DockPanel.Dock="Top" Name="toolBarTrayTop">
   <!-- Filter Toolbar   -->
   <ToolBar Height="26" Name="toolBarFilter" Visibility="{Binding Path=ToolsFilterVisibility}">
      <Button Name="btnFilterRefresh" Command="{Binding Path=FilterRefreshCommand}" Style="{StaticResource BtnRefreshNeededIndication}">
      </Button>
   </ToolBar>
   <!-- FilterSettings Toolbar   -->
   <ToolBar Name="toolBarFilterSettings" Visibility="{Binding Path=ToolsFilterSettingsVisibility}">
      <telerik:RadDataFilter Name="radDataFilterMain" local:DataFilterMarkupExtension.FilterItems="{Binding DefaultFilterItems}" local:DataFilterMarkupExtension.FilterDefinitions="{Binding DefaultFilterDescriptors}"/>
   </ToolBar>
</ToolBarTray>

I need to know when a filter definition has been changed, therefore I have registered the "CollectionChanged" and "ItemChanged" events on the FilterDescriptors collection. This is works fine, with one exception. If the user only changes a filter value, the filter definition is not changing until he hits enter of click a other control inside the DataFilter. But in my case he could click on a separate "Refresh' button inside the ToolBar. In this case the the "FilterDescriptors" do not change (no focus change as the value control still shows the focus border) and so the filter is showing something different than the "FilterDescriptors" are reporting.
My question is is there a know workaround for such a situation?

Many thanks
Thomas
Vlad
Telerik team
 answered on 04 Aug 2011
3 answers
187 views
Hi there,

I'm developing an app using WPF and MVVM, as well as the latest version of RadControls for WPF. I have a RadTabControl that contains my views, bound to an IEnumerable, and everything is working perfectly. However, when I add a new view to the IEnumerable, I'd like to give it focus.

Is there anyway I can achieve this functionality? I can only access the views via the Items property, but not the TabItem associated.

Thanks in advance!
Suresh
Top achievements
Rank 1
 answered on 03 Aug 2011
11 answers
200 views
Hello,

I have upgraded to the Q2 2011 version of the ScheduleView (I need the EnableSmallAppointmentRendering).  I have a requirement to drag from a listbox to the ScheduleView to create an appointment and this was all working using Q1 2011 SP1.  I corrected all the compile errors but the drag no longer starts on the listbox.
I checked the samples and noticed that the Drag Drop sample for the ScheduleView was commented out.  I uncommented it and get the same behavior (the drag never starts).

I also tried to set the RadDragAndDropManager.ExecutionMode to DragExecutionMode.Legacy and while that allows the drag to start, it does not appear that the ScheduleView recognizes the drop as no appointment is created.

Please help...I really must have both the drag/drop and the EnableSmallAppointmentRendering.

Thank you,
Michelle
Yana
Telerik team
 answered on 03 Aug 2011
2 answers
154 views
Hi,

I want to derive from Telerik.Windows.Controls.ScheduleView.Slot to add some extra information as IsHoliday to my special slots and than use this in my special slot style selector. My scheduler binds to an ObservableCollection<CSchedulerSlot> as SpecialSlotsSource.
But the "object item" which is passed to SelectStyle method of the selector is always of type Slot instead of my custom class CSchedulerSlot. The following code does not work, becuase i always get a an InvalidCastException.

public override Style SelectStyle(object item, DependencyObject container, ViewDefinitionBase activeViewDefinition)
        {
            FrameworkElement elem = container as FrameworkElement;
 
            if (elem == null)
                return base.SelectStyle(item, container, activeViewDefinition);
           
            CSchedulerSlot slot = (CSchedulerSlot)item;

What I'm doing wrong? Is there a workaround for this?

thanks in advance,

michael
Michael
Top achievements
Rank 1
 answered on 03 Aug 2011
4 answers
129 views
During Binding of  RichTextBox with HTMLDataProvider the indentation is not getting reflected .I am attaching a sample code for your reference
HtmlDataProvider ht = new HtmlDataProvider();
  ht.RichTextBox = RadRTB;
 ht.Html = "<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd><html xmlns=http://www.w3.org/1999/xhtml><head><meta http-equiv=Content-Type content=text/html; charset=utf-8 /><title>Untitled</title><style type=text/css>  .p_D6859706 { margin: 0px 0px 12px 200px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; ;font-size: 32px}   .s_E6FD2046 {padding-right: 100px; font-family: 'Verdana';font-style: Normal;font-weight: normal;color: #000000; }   </style></head><body><p class=p_D6859706><span class=s_E6FD2046>TEST</span></p></body></html>";
Ivailo Karamanolev
Telerik team
 answered on 03 Aug 2011
2 answers
155 views
Hi,

I'm trying to use the SeriesStyle property of the StackedSeriesDefinition to set  several properties for a lot graph but i get an XamlParseError :
Set property 'System.Windows.Style.TargetType' threw an exception
"'HorizontalStackedBarSeriesDefinition' type must derive from FrameworkElement or FrameworkContentElement."

Here is the xaml
<telerik:RadChart x:Name="chart7" ItemsSource="{Binding SampleData2}">
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping LegendLabel="SUCCESS" CollectionIndex="0">
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:StackedBarSeriesDefinition SeriesItemLabelStyle="{StaticResource CustomSerieItemchart7}" SeriesStyle="{StaticResource MinimizedStackedBarSeriesDefinitionStyle}" />
            </telerik:SeriesMapping.SeriesDefinition>
....
<Style x:Uid="Style_26"
        x:Key="MinimizedStackedBarSeriesDefinitionStyle"
        TargetType="{x:Type telerik:HorizontalStackedBarSeriesDefinition}">
    <Setter x:Uid="Setter_216"
            Property="ShowItemLabels"
            Value="false" />
    <Setter x:Uid="Setter_217"
            Property="LabelSettings">
        <Setter.Value>
            <telerik:BarLabelSettings x:Uid="telerik:BarLabelSettings_1"
                                        LabelDisplayMode="Outside"
                                        ShowConnectors="False" />
        </Setter.Value>
    </Setter>
</Style>


Am i using the wrong property ?
Thanks
- Cedric -
Sia
Telerik team
 answered on 03 Aug 2011
3 answers
159 views
Hi,
 is it possible to template the XAxis item label displayed to replace them by an icon ?

I have found 
<telerik:ChartArea.AxisX>
  <telerik:AxisX x:Uid="telerik:AxisX_1">
    <telerik:AxisX.AxisStyles>
      <telerik:AxisStyles ItemLabelStyle="{StaticResource StrategyMinItemLabelStyle}" />
    </telerik:AxisX.AxisStyles>
  </telerik:AxisX>
</telerik:ChartArea.AxisX>
But what is the targettype of my   StrategyMinItemLabelStyle  style ?
I want to display an icon in place of text .

- Cedric -
Sia
Telerik team
 answered on 03 Aug 2011
1 answer
281 views
I am using the MVVM pattern (with MVVM light) and have a Telerik TabControl bound to a collection of ViewModels like this:

<telerik:RadTabControl x:Name="tabs" telerik:Theming.Theme="Windows7" BackgroundVisibility="Collapsed" TabStripPlacement="Left" TabOrientation="Vertical" DisplayMemberPath="Name" IsContentPreserved="True"
                                           ItemsSource="{Binding ReviewViewModels, UpdateSourceTrigger=PropertyChanged}" ContentTemplateSelector="{StaticResource ReviewTemplateSelector}" Align="Right"
                                           ItemContainerStyle="{StaticResource ReviewCategoryTabStyle}" SelectedIndex="{Binding SelectedIndex}" />

The ReviewViewModels collection is an ObservableCollection<object> because I have one static tab along with any number (generally 2-3) of user-selected tabs based on items selected in another window. Since the ViewModels are drastically different I had to be as generic as possible for the root collection and then use a ContentTemplateSelector to show the appropriate content.

The issue I have is occasionally one of the tabs is duplicated, even though the underlying source doesn't reflect this. It's very intermittent, but I just happened to catch it on my screen while working on something with the app (Phase I is still in development) and the screen showed four tabs (one was a duplicate) and when I hit a button on the view to catch in a breakpoint I could see the underlying collection only contained three total items (which was expected). I can't seem to figure out where this other item is coming from as when data retrieval is complete for the tab content I explicitely instantiate the collection at that time and loop through to add the items like this:
Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Send, new Action(() =>
            {
                this.ReviewViewModels = new ObservableRangeCollection<object>();
 
                //add the categories - this is the only place the items are added
                foreach (var cat in this.ReviewCategories)
                    this.ReviewViewModels.Add(new ReviewCategoryViewModel(cat));
 
                //add a new notes viewmodel
                this.ReviewViewModels.Add(new ReviewNotesViewModel());
 
                //collection size shows three entries (two ReviewCategoryViewModel and one ReviewNotesViewModel), tabs occasionally show four at this point
 
                this.SelectedIndex = 0;
 
                this.IsBusy = false;
            }));

Any suggestions on this as to where to even start looking? I am using Q2 2011.

Edit: It just happened again and the interesting thing is the fourth tab (the duplicate) is selected even though (as indicated above) I set the selected index to 0. I hit a button on the view that takes me to the VM and did a couple of screenshots showing the data is correct:

http://www.clearsolgroup.com/images/immediate-window.png (Immediate Window - shows three total ViewModels [expected] and SelectedIndex is 0)

http://www.clearsolgroup.com/images/duplicate-tab.png (UI of the duplicate tab, with the fourth being selected even though SelectedIndex is 0 and only three ViewModels exist).

Again, this is VERY interimmittent and reproducing it is intentionally possible. It just happens occasionally.
Vladislav
Telerik team
 answered on 03 Aug 2011
1 answer
124 views
Hi,

I am trying to do a ElementName binding in CellTemplate, however when I follow the solution on this page
http://www.telerik.com/help/wpf/gridview-troubleshooting-elementname-binding.html
The example code doesn't work. 

Can you take a look?

Ivan Ivanov
Telerik team
 answered on 03 Aug 2011
1 answer
135 views
Hi,

  Is it possible to use a spline line and a step line in a TimeBar.

Kind regards
Missing User
 answered on 03 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?