Telerik Forums
UI for WPF Forum
6 answers
615 views
Hi

We would like to implement OpenDropDownOnFocus for AutoCompleteBox ( RadComboBox has this property and this behavior).
We override the default AutoCompeteBox Style .
How can we do that?
Thanks
Vladi
Telerik team
 answered on 04 Aug 2014
2 answers
173 views
Hi,

I have used the following blog to get some varying sized tiles which is great but I would like my users to be able to adjust tile sizes themselves.

http://blogs.telerik.com/xamlteam/posts/11-06-25/new-tileview-features.aspx

Is there any way that you can resize a tile by dragging on its bottom right corner?

I can do it by putting a button on the tile and in the button press adjust the RestoredWidth and RestoredHeight of the tile but this is not a great UI experience.

Thanks
Anthony
Anthony
Top achievements
Rank 1
Iron
Veteran
 answered on 04 Aug 2014
6 answers
218 views
Hi

I’m using RadGridView in my application. I have set style of Template Property of GridView with Blend.

The problem is that GroupPanel and GroupFooter are shown even after I have set:

radGridView1.ShowGroupFooters = false;

radGridView1.ShowGroupPanel= false;

 
Is there anything wrong with my
style?

The following is my style:

    <Style x:Key="CustomGridViewStyle" TargetType="{x:Type telerik:RadGridView}" BasedOn="{StaticResource ResourceKey=RadGridViewStyle}">

        <Setter Property="Template">

            <Setter.Value>

                <ControlTemplate TargetType="telerik:RadGridView">

                    <Grid>

                        <Grid.RowDefinitions>

                            <RowDefinition/>

                            <RowDefinition Height="auto"/>

                        </Grid.RowDefinitions>

                        <Grid Grid.Row="0">

                            <VisualStateManager.VisualStateGroups>

                                <VisualStateGroup x:Name="GridViewActivity">

                                    <VisualState x:Name="Idle">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                   
<DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Collapsed</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                    <VisualState x:Name="Busy">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                    <DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Visible</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                                </DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                </VisualStateGroup>

                                <VisualStateGroup x:Name="ColumnHeadersVisibility">

                                    <VisualState x:Name="ColumnHeadersVisible">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                    <DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Visible</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                                </DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                    <VisualState x:Name="ColumnHeadersCollapsed">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_HeaderRow" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                   
<DiscreteObjectKeyFrame.Value>

                                               
        <Visibility>Collapsed</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                </VisualStateGroup>

                                <VisualStateGroup x:Name="ColumnFootersVisibility">

                                    <VisualState x:Name="ColumnFootersVisible">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                   
<DiscreteObjectKeyFrame.Value>

                                               
        <Visibility>Visible</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                    <VisualState x:Name="ColumnFootersCollapsed">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FooterRow" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                    <DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Collapsed</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                </VisualStateGroup>

                                <VisualStateGroup x:Name="GroupPanelVisibility">

                                    <VisualState x:Name="GroupPanelVisible">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GroupPanel" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                    <DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Visible</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                    <VisualState x:Name="GroupPanelCollapsed">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GroupPanel" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                   
<DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Collapsed</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                </VisualStateGroup>

                                <VisualStateGroup x:Name="InsertRowVisibility">

                                    <VisualState x:Name="InsertRowVisible">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AddNewRow" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                   
<DiscreteObjectKeyFrame.Value>

                                                
       <Visibility>Visible</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                    <VisualState x:Name="InsertRowCollapsed">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_AddNewRow" Storyboard.TargetProperty="Visibility">

                                               
<DiscreteObjectKeyFrame KeyTime="0">

                                                    <DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Collapsed</Visibility>

                                                   
</DiscreteObjectKeyFrame.Value>

                                                </DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                </VisualStateGroup>

                                <VisualStateGroup x:Name="DisabledStates">

                                    <VisualState x:Name="Enabled"/>

                                    <VisualState x:Name="Disabled">

                                        <Storyboard>

                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background_Disabled" Storyboard.TargetProperty="Visibility">

                                                <DiscreteObjectKeyFrame KeyTime="0">

                                                   
<DiscreteObjectKeyFrame.Value>

                                                       
<Visibility>Visible</Visibility>

                                                    </DiscreteObjectKeyFrame.Value>

                                               
</DiscreteObjectKeyFrame>

                                            </ObjectAnimationUsingKeyFrames>

                                        </Storyboard>

                                    </VisualState>

                                </VisualStateGroup>

                            </VisualStateManager.VisualStateGroups>

                            <Grid.RowDefinitions>

                                <RowDefinition Height="Auto"/>

                                <RowDefinition x:Name="PART_AttachedBehaviorRow" Height="Auto"/>

                                <RowDefinition/>

                                <RowDefinition x:Name="ScrollBarRow" MinHeight="0" Height="0"/>

                                <RowDefinition Height="Auto"/>

                            </Grid.RowDefinitions>

                            <Grid.ColumnDefinitions>

                                <ColumnDefinition/>

                                <ColumnDefinition x:Name="ScrollBarColumn"
MinWidth="0" Width="0"/>

                                <ColumnDefinition Width="Auto"/>

                            </Grid.ColumnDefinitions>

                            <telerik:GridViewGroupPanel x:Name="PART_GroupPanel"

                    Grid.ColumnSpan="3"

                    Visibility="{TemplateBinding Visibility}"

                    Background="{TemplateBinding GroupPanelBackground}"

                    Foreground="{TemplateBinding GroupPanelForeground}"

                    BorderBrush="{StaticResource GridView_GroupPanelOuterBorder}"/>

                            <ItemsControl x:Name="PART_ControlPanelItemsControl" Grid.Column="2" IsTabStop="False" HorizontalAlignment="Right">

                                <ItemsControl.ItemsPanel>

                                    <ItemsPanelTemplate>

                                        <StackPanel Orientation="Horizontal"/>

                                    </ItemsPanelTemplate>

                                </ItemsControl.ItemsPanel>

                                <ItemsControl.ItemTemplate>

                                    <DataTemplate>

                                        <telerik:ControlPanelItemControl />

                                    </DataTemplate>

                                </ItemsControl.ItemTemplate>

                            </ItemsControl>

                            <Border

                    Name="PART_MasterGridContainer"

                    Grid.Row="2"

                    Grid.RowSpan="2"

                    Grid.ColumnSpan="3"

                    Background="{TemplateBinding Background}"

                    Margin="0,-1,0,0"

                    BorderBrush="{TemplateBinding BorderBrush}"

                    BorderThickness="{TemplateBinding BorderThickness}"

                    Padding="{TemplateBinding Padding}"/>

                            <telerik:GridViewScrollViewer x:Name="PART_ItemsScrollViewer"

                    Background="Transparent"

                    CanContentScroll="True"

                    Grid.Row="2"

                    Grid.RowSpan="2"

                    Grid.ColumnSpan="3"

                    Margin="1,0,1,1">

                                <telerik:GridViewScrollViewer.HeaderRow>

                                    <telerik:GridViewHeaderRow x:Name="PART_HeaderRow" IndentLevel="{TemplateBinding
GroupCount}"
Visibility="{TemplateBinding Visibility}"/>

                                </telerik:GridViewScrollViewer.HeaderRow>

                                <telerik:GridViewScrollViewer.NewRow>

                                    <telerik:GridViewNewRow Name="PART_AddNewRow" IndentLevel="{TemplateBinding
GroupCount}"
Visibility="{TemplateBinding Visibility}"/>

                                </telerik:GridViewScrollViewer.NewRow>

                                <telerik:GridViewScrollViewer.FooterRow>

                                    <telerik:GridViewFooterRow x:Name="PART_FooterRow" IndentLevel="{TemplateBinding
GroupCount}"
Visibility="{TemplateBinding Visibility}"/>

                                </telerik:GridViewScrollViewer.FooterRow>

                                <telerik:GridViewVirtualizingPanel x:Name="PART_GridViewVirtualizingPanel"/>

                            </telerik:GridViewScrollViewer>

                            <telerik:ScrollPositionIndicator x:Name="PART_ScrollPositionIndicator"

                    Margin="0,0,28,0"

                    IsHitTestVisible="False"

                    HorizontalAlignment="Right"

                    Grid.Row="2"

                    Grid.ColumnSpan="3"

                    Visibility="{Binding IsScrolling, Mode=TwoWay, RelativeSource={RelativeSource
TemplatedParent}, Converter={StaticResource
BooleanToVisibilityConverter}}"

                    ContentTemplate="{TemplateBinding ScrollPositionIndicatorTemplate}"/>

                            <Border x:Name="PART_FrozenColumnsPreview"

                    Grid.Row="1"

                    Visibility="Collapsed"

                    HorizontalAlignment="Left"

                    VerticalAlignment="Stretch"

                    Grid.RowSpan="4"

                    Background="#33000000"

                    Width="6"/>

                            <telerik:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator"

                    Visibility="Collapsed"

                    IsBusy="{Binding IsBusy, Mode=TwoWay, RelativeSource={RelativeSource
TemplatedParent}}"

                    Grid.RowSpan="4"

                    Grid.ColumnSpan="3"/>

                            <Rectangle x:Name="Background_Disabled" Fill="{StaticResource
Background_Disabled}" IsHitTestVisible="False" Grid.RowSpan="5" Grid.ColumnSpan="3" Visibility="Collapsed"/>

                        </Grid>

                        <Grid Grid.Row="1"

                           
<telerik:RadButton Width="50" content="Click"/>

                        </Grid>

                    </Grid>

                </ControlTemplate>

            </Setter.Value>

        </Setter>

    </Style>

 
Ghasem
Top achievements
Rank 1
 answered on 03 Aug 2014
3 answers
904 views
Hi,

I'm trying to close a RadWindow from my view model. I've bound DialogResult to my view model but setting it doesn't seem to close the window.

Is there something I'm missing or does the RadWindow only support being closed by calling it's Close event?

Any help would be appreciated.
pavan
Top achievements
Rank 1
 answered on 01 Aug 2014
2 answers
1.6K+ views
I am coding in C#, using the MVVM pattern. I have a Main Window that uses several User Controls. I am trying to pass string data fro the Main Window to the View Model of the User Control. So far I have been able to pass the Main Window data to the User Control View and View code behind. However, I can't seem to expose that data to the User Control View Model. Here is what does work:

Main Window XAML,

UCV:SetupUC UC1="{Binding DataContext.ContainerData, ElementName=winCon, Mode=TwoWay}">
</UCV:SetupUC>

User Control XAML,

<TextBox x:Name="tbx1" HorizontalAlignment="Left" Height="23" Margin="159,22,0,0" TextWrapping="Wrap" Text="{Binding UC1, ElementName=root, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" Width="120" RenderTransformOrigin="0.017,0.304"/>

User Control XAML code behind,

public partial class SetupUC : UserControl, INotifyPropertyChanged
    {

        public static readonly DependencyProperty UC1Property =
    DependencyProperty.Register(
      "UC1", typeof(string), typeof(SetupUC),
        new FrameworkPropertyMetadata()
        {
            PropertyChangedCallback = OnUC1Changed,
            BindsTwoWayByDefault = true
        });
        public string UC1
        {
            get { return (string)GetValue(UC1Property); }
            set
            {
                SetValue(UC1Property, value);
            }
        }
        private static void OnUC1Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (e.OldValue != e.NewValue)
            {
                // code to be executed on value update
            }
        }
        public SetupUC()
        {
            InitializeComponent();
            SetupViewModel svm = new SetupViewModel();
            this.DataContext = svm;
            Binding binding = new Binding("ViewModelStringProperty") { Source = svm, Mode = BindingMode.TwoWay };
            BindingOperations.SetBinding(this, SetupUC.UC1Property, binding);
        }

The last 2 lines above are an attempt to bind the DP to a property in the User Control View Model - which other posts have suggested as a possible solution. I have not been able to get the binding to work. Again, the TextBox x:Name="tbx1" is displaying the DP, UC1, just fine; it changes "realtime" when the bound data in the Main Window changes.
Stephen
Top achievements
Rank 1
Iron
 answered on 01 Aug 2014
4 answers
105 views
Hello All.
I've a scenario when I use RadGridView linked with QueryableDataProvider.
QueryableDataProvider accepts IQueryable linked with DBContext.
In RadGridView in UI I did groping by one column and sorting by another column

class A : TEntity
{
    public string P1;
    public string P2;
}

Group by P1 and sort by P2 over UI.

In case, IQueriable points to in memory collection, everything works fine.
But when IQueriable points to IDbSet<TEntity> - sorting is not applied.
One difference between my tests is in "ToList()" called on IQueriable passed to QueryableDataProvider constructor.
Unfortunately, I cannot use InMemory collection.
Telerik version is 2014.1.331.45
Dimitrina
Telerik team
 answered on 01 Aug 2014
3 answers
440 views
I use the RadTimePicker on the GridViewDataColumn.

I want to be seen as 24 hours.

Can not use this.radTimePickerStartOn.Culture.DateTimeFormat.ShortTimePattern = "HH:mm:ss";

What should I do?

<telerikGridView:RadGridView x:Name="radGridView"
                                            Grid.Row="2"
                                            ItemsSource="{Binding UserCards}"
                                            SelectedItem="{Binding SelectedUserCard, Mode=TwoWay}"
                                            Margin="5" 
                                            SelectionMode="Single"
                                            ShowGroupPanel="False"
                                            AutoExpandGroups="True"
                                            AutoGenerateColumns="False"
                                            RowDetailsVisibilityMode="Collapsed"
                                            RowIndicatorVisibility="Collapsed"
                                            CanUserFreezeColumns="True"
                                            FrozenColumnCount="2">
    <telerikGridView:RadGridView.Columns>
         <telerikGridView:GridViewDataColumn Width="190" Header="{Binding ResourceWrapper.StringTable.StartedOn, Source={StaticResource StringTable}}" CellStyleSelector="{StaticResource UserCardCellStyleSelector}" DataMemberBinding="{Binding Card.StartedOn, Mode=TwoWay}" DataFormatString="{}{0:yyyy-MM-dd HH:mm:ss}">
                                                <telerikGridView:GridViewDataColumn.CellEditTemplate>
                                                    <DataTemplate>
                                                        <StackPanel Orientation="Horizontal">
                                                            <telerikInput:RadDatePicker DateTimeWatermarkContent="{x:Null}" SelectedDate="{Binding StartDate, Mode=TwoWay}" Width="100" IsTooltipEnabled="False" />
                                                            <StackPanel HorizontalAlignment="Left" Width="90">
                                                                <telerikInput:RadTimePicker x:Name="radTimePickerStartOn" SelectedValue="{Binding StartTime, Mode=TwoWay}" MinWidth="80" Width="90" Margin="0,0,0,0" Culture="ko" />
                                                            </StackPanel>
                                                        </StackPanel>
                                                    </DataTemplate>
                                                </telerikGridView:GridViewDataColumn.CellEditTemplate>
         </telerikGridView:GridViewDataColumn>
    </telerikGridView:RadGridView.Columns>
</telerikGridView:RadGridView>
Boris
Telerik team
 answered on 01 Aug 2014
6 answers
654 views
Hi,

I am facing small problem.That I want know selectedItems in radgridview.I am using MVVM pattern.In code behind file i am able to get the selectedItems.But in my viewmodel I am I am not getting.I had tried with following code samples.


<Style TargetType="{x:Type telerik:GridViewRow}">
<Setter Property="IsSelected" Value="{Binding Mode=OneWayToSource, Path=SelectedYN}"/>
</Style>
 and 
<telerik:RadGridView.ItemContainerStyle>
<Style TargetType="{x:Type telerik:GridViewRow}">
<Setter Property="IsSelected" Value="{Binding Mode=OneWayToSource, Path=SelectedYN}"/>
</Style>
</telerik:RadGridView.ItemContainerStyle> SelectedYN is a property in my viewModel.(Its updates the ItemsSource)
Please help me in this issue.

Thanks and Regards
Naresh Mesineni
Dimitrina
Telerik team
 answered on 01 Aug 2014
1 answer
153 views
How can i draw a histogram on the Radslider like the image shown bellow using c# wpf?
How to add a histogram on RadSlider based on high and low values.I am attaching the image
Pavel R. Pavlov
Telerik team
 answered on 01 Aug 2014
4 answers
1.8K+ views
Hi,

I am using version 2014.1.224.45 of UI for WPF. I need to make my docking control fill all my client area of its parent UserControl.

If i do not explicitly define a Height I receive the error: "Placing Docking control in a panel or control that measures it with infinite width or height is not supported in the current version."

Is it possible?
How can I do this ?

If the is not really possible which events I must drive to define explicitly the heit as the hight of the parent. I have treid the SizeChanged Event of the parent bit it did not work.

Thanks in advance


Kalin
Telerik team
 answered on 01 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
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
ProgressBar
Sparkline
LayoutControl
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
Rating
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?