Telerik Forums
UI for WPF Forum
4 answers
141 views
Hello!

In my grid i have the cell with price value. At different times price may vary. 
How to change foreground/celltemplate of cell according to change binding value?
Cyls
Top achievements
Rank 1
 answered on 13 Jun 2014
2 answers
248 views
Hi,

I want to assign some calculated values to scrollbar's  offset of GanttChart view but cann't do that. There are couple of gantt tasks that have default Start and End values:
ganttTask.Start = DateTime.MinValue;
ganttTask.End = DateTime.MinValue;

In this cases if user selects this ganttTask on the ColumnsPanel, the horizontal scrollbar of EventsPanel moves to the start of  GanttChart's VisibleRange. I suppose it tries to show me that task via scrolling to its Start date. But this is not what I need. I  want the horizontal scrollbar to stay at the same position as it was before selection. To achieve this I've binded a SelectedItem property to a view model's property and when it is changed I assign another horizontal offset value :
public ScheduleItem SelectedItem
        {
            get
            {
                return _selectedItem;
            }
            set
            {
                _selectedItem = value;
              // SomeType : IGanttTask and for all items of SomeType the next comes true: 
              //Start = DateTime.MinValue;
              // End = DateTime.MinValue;
                if (_selectedItem is SomeType)
                {
                    EventsPanel.HorizontalOffset = HorisontalPannelOffset;
                }
                RaisePropertyChanged(() => SelectedItem);
            }
        }
Here, the EventsPanel is a view model's property that referens to the GanttView's EventsPanel property. And this approach doesn't work for me. The scrollbar moves to the start of VisibleRange.  I wonder is there a way to set the horizontal offset for the selected gantt task?

Thanks any help.

Kind regards,
Natalia Novosad
Natalia
Top achievements
Rank 1
 answered on 13 Jun 2014
3 answers
289 views
RadPane is automatically selected (IsSelected set to true) after adding to RadPaneGroup.Items collection. Can I prevent such behaviour? I would like to add new RadPane to the RadPaneGroup but not change already selected RadPane.
Kalin
Telerik team
 answered on 13 Jun 2014
1 answer
1.1K+ views
Hi,
How to make the RadWindow flash in taskbar?
One of the popular chatting programms does that - when you get a message, it's taskbar representation turns blue. Is it possible to do the same with a RadWindow?
What I've tried so far:
first I've made the window to appear in the taskbar by adding this to xaml:
navigation:RadWindowInteropHelper.ShowInTaskbar="True"

Next i tried googling how to do that for a regular wpf window and found something like this:
http://www.jarloo.com/flashing-a-wpf-window/
this compiles nicely but doesnt work in my case even for a wpf window. However, if i use it for a radwindow by using something like this:

public static void FlashWindow(RadWindow control)
        {
            var window = control.ParentOfType<Window>();
            window.FlashWindow();
        }
I get a null pointer exception. (there is no null pointer for regular window, but it doesnt seem to be flashing either)

Anyway, I don't really mind the method, I would just like to be able to make the taskbar window flash (system flash or manual changing of the background color on the taskbar if there is such an option?)
Is it possible with a RadWindow and if so - how to do it?
Thanks.
Kalin
Telerik team
 answered on 13 Jun 2014
3 answers
60 views
Hi Team,

We are using cell templates for the cells inside the RadTreeListView. In .Net 4.5 and with latest telerik package CUIT is not able to navigate to the controls placed inside the cell template where as in .Net 4.0 we were able to automate actions on it using CUIT.

Following is the sample xaml file code:
<Window x:Class="MainWindow"
             xmlns:local="clr-namespace:WpfApplication1"
     Height="350" Width="525" Title="InterWalmartGraph Cafeteria Grocery Store"
    
    <Window.Resources
        <DataTemplate x:Key="ReadonlyTextCellTemplate"
            <DockPanel Margin="1"
                <TextBlock Text="{Binding Count}"/> 
                <Button Content="{Binding Name}" /> 
            </DockPanel
        </DataTemplate
    </Window.Resources>      
        
    <Grid x:Name="LayoutRoot"
        <telerik:RadTreeListView x:Name="radTreeListView"
                            AutoGenerateColumns="False"
            <telerik:RadTreeListView.ChildTableDefinitions
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}" /> 
            </telerik:RadTreeListView.ChildTableDefinitions
            <telerik:RadTreeListView.Columns
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"
                                    Header="Name" /> 
                <telerik:GridViewDataColumn Header="Count" CellTemplate="{StaticResource ReadonlyTextCellTemplate}" /> 
            </telerik:RadTreeListView.Columns
        </telerik:RadTreeListView>   
    </Grid>      
</Window>

Regards,
Sirisha
Yordanka
Telerik team
 answered on 13 Jun 2014
1 answer
118 views
Hi,

I have one application in which I am showing data availability by date wise on Rad Timeline but I am using .Net Framework Version 3.5 controls. I want add the thumb in it. I tried to explore Rad Timeline but could not able to add thumb on it. Actually when timeline is zoomed in then it is very difficult to check all dates by scrolling through scroll bar so I want to add thumb in it so user can easily scroll the timeline using mouse and dragging it in left-right either direction like scrolling through mail on smartphone. How to achieve this behavior with .Net Framework 3.5 Rad Timeline Control.
Pavel R. Pavlov
Telerik team
 answered on 13 Jun 2014
2 answers
147 views
Hello!

I have noticed that when I have only one of my items expanded and the rest of them collapsed in my radpanelbar, the collapsed items all group/align at the bottom which creates a great deal of empty space between them and the expanded item (see screenshot). I was wondering if there was any way to align them upwards instead, so that they would start right after the expanded item? I have tried the following but it seems that setting

<Setter Property="VerticalAlignment" Value="Top"/>

in the style for the menu item does not help.

All the styling code is here:

<Style TargetType="telerik:RadPanelBarItem" x:Key="LeftMenuSubItemStyle">
            <Style.Triggers>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter Property="FontWeight"  Value="Normal"/>
                    <Setter Property="Opacity"  Value="0.70"/>
                </Trigger>
 
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="FontWeight"  Value="Bold"/>                   
                </Trigger>
            </Style.Triggers>
            <Setter Property="IsSelected" Value="{Binding IsCurrent, Mode=TwoWay}" />
            <Setter Property="IsEnabled" Value="{Binding IsNavigationEnabled, Mode=TwoWay}" />
        </Style>
 
        <Style TargetType="telerik:RadPanelBarItem" x:Key="LeftMenuMainItemStyle">
             
            <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
            <Setter Property="VerticalAlignment" Value="Top"/>
        </Style>
 
 
        <!--Data template for the DescriptiveSubMenuItem object-->
        <HierarchicalDataTemplate DataType="{x:Type domain:DescriptiveSubMenuItem}">
            <Grid Margin="15,0,0,0">
               <TextBlock Text="{Binding Title}" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TextWrapping="Wrap" FontSize="12">
                   <TextBlock.InputBindings>
                        <MouseBinding MouseAction="LeftClick" Command="{ Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.MenuItemClicked}" CommandParameter="{Binding Title}" />
                    </TextBlock.InputBindings>
                </TextBlock>
                <Rectangle HorizontalAlignment="Right" Width="15" Height="15" Visibility="{Binding IsCheckVisible}" Fill="{StaticResource CompleteCheck}" Margin="0,0,10,0">
                    <Rectangle.InputBindings>
                        <MouseBinding MouseAction="LeftClick" Command="{ Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.MenuItemClicked}" CommandParameter="{Binding Title}" />
                    </Rectangle.InputBindings>
            </Rectangle>
            </Grid>
 
        </HierarchicalDataTemplate>
 
        <!--Data template for the DescriptiveMenuItem object-->
        <HierarchicalDataTemplate DataType="{x:Type domain:DescriptiveMenuItem}" ItemsSource="{Binding SubMenuItems}" ItemContainerStyle="{StaticResource LeftMenuSubItemStyle}">
            <Label Content="{Binding Header}" FontSize="16" Margin="0"/>
        </HierarchicalDataTemplate>
    </UserControl.Resources>
    <Grid>
 
        <telerik:RadPanelBar ItemsSource="{Binding ActiveNavigationItems}" ExpandMode="Multiple" ItemContainerStyle="{StaticResource LeftMenuMainItemStyle}">
 
        </telerik:RadPanelBar>
 
    </Grid>

Any suggestions would be greatly appreciated!
Joonatan
Top achievements
Rank 1
 answered on 13 Jun 2014
1 answer
119 views
I'm using a WPF RadSplitButton and I'd like to to some special handling, when the DropDownClosed happens:

If the User presses ESC to close the dropped down content of my RadSplitButton, I'd like to do some undo operations. How do I get the Key that has caused the RadSplitBotton to close it's DropDown section?

In the Event Handler

        private void RadSplitButton_DropDownClosed(object sender, RoutedEventArgs e)
        {}

there is only RoutedEventArgs, which does not contain the pressed Button.

Martin Ivanov
Telerik team
 answered on 13 Jun 2014
1 answer
107 views
Hi there,

we have a converter in place hooked up to the ElementExporting event so our CSV export is properly converted.

Using the XlsxFormatProvider and RadSpreadsheet doesn't trigger that event to be fired so our Excel files are not converted.
How can exported values be customized in the RadSpreadsheet context?

Can we somehow use the Html exported by the RadSpreadsheet ?

Cheers,
Jay
Dimitrina
Telerik team
 answered on 13 Jun 2014
1 answer
89 views
Hello, 

I need to do zoom in background image with the items (rectangles and ellipses) without that these moving the site in relation at the image. It's possible to do this?

Thanks, 

Maite.
Petar Mladenov
Telerik team
 answered on 13 Jun 2014
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?