Telerik Forums
UI for WPF Forum
1 answer
258 views
Hi
Is there any offline trail installer for The WPF Controls ?
My development machine is disconnected from the web and i need to check the Controls in my inner environment.
Thanks in advance
Low,
Andrey
Telerik team
 answered on 30 Oct 2012
2 answers
190 views
Hello!

I have following xaml:

<Window x:Class="WPFExample.MainWindow"
    xmlns:local="clr-namespace:WPFExample"
    Title="MainWindow" Height="350" Width="525"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Window.Resources>
    <x:ArrayExtension Type="{x:Type local:Model}" x:Key="Models">
        <local:Model StringProp="Some value" Int32Prop="3" />
        <local:Model StringProp="Another one" Int32Prop="12" />
        <local:Model StringProp="The same" Int32Prop="132" />
        <local:Model StringProp="Tired..." Int32Prop="-5" />
        <local:Model StringProp="End it" Int32Prop="43" />
        <local:Model StringProp="..." Int32Prop="11" />
        <local:Model StringProp="the end." Int32Prop="12" />
    </x:ArrayExtension>
</Window.Resources>
<ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <telerik:RadGridView  x:Name="grid" ItemsSource="{StaticResource Models}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Width="200">
                                <ComboBox.Items>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                </ComboBox.Items>
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
        <telerik:RadGridView x:Name="grid1" Grid.Row="1" ItemsSource="{StaticResource Models}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Width="200">
                                <ComboBox.Items>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                </ComboBox.Items>
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
        <telerik:RadGridView x:Name="grid2" Grid.Row="2" ItemsSource="{StaticResource Models}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Width="200">
                                <ComboBox.Items>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                </ComboBox.Items>
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</ScrollViewer>

It's just simple window with three radgridviews, all of a kind.

Problem: if one of radgridviews not entirely visible and i click on combobox within this radgridview, then it first jumps into view, and just then combobox click processed. How can i remove this behaviour, coz i don't need radgridview to be fully visible?

Thank you.

Vera
Telerik team
 answered on 30 Oct 2012
1 answer
210 views
I have a RadDataForm that is bound to a heterogeneous collection. I'm using a DataTemplateSelector to select an appropriate DataTemplate for each Item, as it becomes current.

There is, of course, a different template for each type of item, but they all share some bothersome properties:
  • They all include a large number of controls
  • They all include a large number of validation rules
  • They all include many validation rules that operate between controls or on groups of controls.

As an example, each template has a three or more GroupBoxes, and validation rules that require that at least one checkbox in group A and at least one checbox in group B be selected, unless a checkbox in group C is selected, in which case all of the fields in groups A and B must be cleared.

The resulting rules were complex to construct, but they work correctly, now, when the form is being edited. The problem is when the form is being viewed.

When the form is open in view-only mode, and I navigate from one item to the next, using the prev/next buttons, it's taking more than a second for the new item to be displayed. And that's entirely unacceptable.  I've been digging into it, trying to identify where the time is being spent, and from what I can see the largest part is in the validation code. All of these fields are validating against each other, this checkbox is checking to make sure that that field is not empty, this groupbox is checking to see that it has at least one checkbox checked, and that the other checkbox does not, etc.

And what's really aggravating is that none of this is necessary. Even if the data in the database were somehow incorrect, when it is loaded into the form in view-only mode, I'd not want to display validation errors.  What is in the database is what is in the database, regardless of what it is. Validation should be occurring only in edit mode.

So, is there a way to turn off the validation checks? To load the data without running the validation checks?
Ivan Ivanov
Telerik team
 answered on 30 Oct 2012
1 answer
204 views
Hey guys, i had a few questions regarding the docking control.  I am looking to implement the dock control as a tabbed interface, so the docked windows begin docked and will function as tabs that can be dragged off the tab area into floating windows for viewing multiple at the same time, or docked below the tabs so that multiple tabs can be viewed and compared.  There a few behavior things i was wondering about:


1) can you add a button to go to the next/previous tab?  

we are hoping to add buttons into the dock windows that allow the user to click a left or right arrow to navigate to the next or previous tab (similar to navigating many web slide shows).  how can it determine which window is previous or next in the list and bring it into view?  


 2) can the dragging a floating tab to the tab area dock it?  

right now the only way to dock a floating window is to hover over the dock pane and then drag it to the center of the compass.  Is there any way to make the tab area function like the center of the compass, so users could drag to the tab area to dock a floating window? 


3) can dragging docking a window to the left or right side split the area below the tab area, respecing the existing tab interface?

right now if you drag a floating window to the compass and drop it on the left it pushes the tab area to the right.  we would prefer that it respect the main tab area and dock within the pane below it. 

Thank you,
Matt.
George
Telerik team
 answered on 30 Oct 2012
0 answers
84 views
Hi..
In your custom column example with the DateTimePicker. How do you set the theme of the DateTimePicker?
I've copied the code but am unable to set the theme or turn off the Week numbers.
thx


                            <controls:DateTimePickerColumn DataMemberBinding="{Binding CallActivity_date}" telerik:StyleManager.Theme="Vista" 
Header="Date/Time" HeaderTextAlignment="Left"
TimeInterval="0:30:0"
Width="155"
DataFormatString="g" >
                              </controls:DateTimePickerColumn>
Jon
Top achievements
Rank 1
 asked on 30 Oct 2012
0 answers
103 views
Hi,

Our client has reported an error produced on filter when item has any underscore. We are using Telerik 2012.2.607.40

If user clicks on checkboxes it filters items as expected but if user clicks on text it raises the following exception:

System.ArgumentNullException was unhandled
  Message=Value cannot be null.
Parameter name: element
  Source=Telerik.Windows.Controls
  ParamName=element
  StackTrace:
       at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Extensions\ParentOfTypeExtensions.cs:line 74
       at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       at Telerik.Windows.Controls.GridView.FilteringDropDown.ShouldCloseOnMouseButton(UIElement eventOriginalSource) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 386
       at Telerik.Windows.Controls.GridView.FilteringDropDown.Telerik.Windows.Controls.IPopupWrapperOwner.ShouldCloseOnMouseButtonDown(UIElement eventOriginalSource) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 376
       at Telerik.Windows.Controls.AutoClosePopupWrapper.OnPreviewMouseButtonDown(Object sender, MouseButtonEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Popup\AutoCloseWrapper\AutoClosePopupWrapper.cs:line 207
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
...

It is easy to reproduce with this code.

MainWindow.xaml
<Window x:Class="TestUnderscore.MainWindow"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Controls:RadGridView x:Name="RadGridView"/>
    </Grid>
</Window>

MainWindow.xaml.cs
namespace TestUnderscore
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            var items = new ObservableCollection<string>();
            for (int i = 0; i < 50; i++ )
            {
                items.Add("Item_" + i);
            }
            this.RadGridView.ItemsSource = items;
        }
    }
}

Mikel
Top achievements
Rank 1
 asked on 30 Oct 2012
2 answers
229 views
I have been looking at the WPF Controls example for RadBusyIndicator in the "Demos - RadControls for WPF Q3 2012" application, and I cannot figure out how to have my own application display the left/right scrolling dots instead of the normal rotating yellow circle that I am appearing to get by default. For right now, I can set the BusyContext to whatever text I want and turn the IsBusy on and off in my C# code, and that is all working fine. The IsIndeterminate flag is set to True in my XAML.

From the controls example app, there are only 3 files shown for the configurator example, and I can't see how the busy indicator is being changed. Is there something that I am missing, or is there some C# or XAML not being shown in the controls example app that is modifying the indicator?
Brian
Top achievements
Rank 1
 answered on 30 Oct 2012
1 answer
107 views
Hi,

I have following code, which should hide unknown elements when deserializing layout xml
private void dockManager_ElementLoaded(object sender, LayoutSerializationEventArgs e)
 {
   if (e.AffectedElement is RadPane)
   {
     RadPane paneView = e.AffectedElement as RadPane;
 
 
     ILayoutPane paneVM = viewModel.LayoutPanes
       .OfType<ILayoutPane>()
       .FirstOrDefault(vm => vm.Id == e.AffectedElementSerializationTag);
 
     if (paneVM == null)
     {
       paneView.IsHidden = true;
     }
   }
 }


Althought   paneView.IsHidden = true   is called, the pane is still visible after the LoadLayout.
I tried to set title of the paneView.Title as well. Title was not displayed.

Layout file look like this:

<RadDocking>
  <DocumentHost>
    <RadSplitContainer>
      <Items>
        <RadPaneGroup SelectedIndex="0">
          <Items>
            <RadPane IsHidden="False" IsDockable="True" />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
  </DocumentHost>
</RadDocking>



And another question, or request:
How can I prevent element from being serialized or deserialized? ElementLoading and ElementSaving should have  cancelable EventArgs.

private void dockManager_ElementLoading(object sender, LayoutSerializationLoadingEventArgs e)
{
  if (e.AffectedElementSerializationTag == null) e.Cancel = true;
}


 
Thanks
Vladi
Telerik team
 answered on 30 Oct 2012
1 answer
132 views
hi,

i've recently decided to chose one of 3rd party components to use in my wpf applications...when i came to this site i saw this image,i loved it's design...but in trial i couldn't find controls or samples about how can i do something like that...can any one help me in a little guide about how can i achieve a design like that? (Specially the parts i've pointed on...what kind of control are they)
Harald Bacik
Top achievements
Rank 2
 answered on 30 Oct 2012
1 answer
214 views
Hi
I'm doing a RadCartesianChart with a ScatterLineSeries. When the y-values are negative, the chart always extends the vertical axis all the way from 0, even if the y-values are nowhere near 0. Say, for instance, if the y-values only vary between -10 and -11: The graph displays the area between 0 and -12 so that there is a large empty area above the line and my graph comes out quite flat. Losing a lot of the information that could have been expressed. I attach an example in a jpg.

The behaviour I would like, and that I think would make sense, is that the y-axis extends just around the values in my dataset. This is what happens for positive y-values, I can't see why there is it's different for negative values.

I have tried using RangeExtendDirection="None" and Minimum="{x:Static System:Double.NegativeInfinity}" Maximum="{x:Static System:Double.PositiveInfinity}" on the telerik:LinearAxis elements, neither make any difference.

Is there any way to fix this? I attach a simplified version of my graph xaml below. 

Thanks
A.M



        <telerik:RadCartesianChart Name="LineChart">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis />
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:ScatterLineSeries Name="Series" ItemsSource ="{Binding}"/>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
Petar Marchev
Telerik team
 answered on 30 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?