Telerik Forums
UI for WPF Forum
3 answers
194 views
Hi,

I have a static set of images within the transition control. Right now I can display 10 images per per page. I want to ask how can I create another set of 10 images that will be shown on the next page. Data template only allows me one set of images. 

Also, how can I have two custom images (arrow left and arrow right) to trigger "Next page" and "Previous page"? My current code is shown below:


<telerik:RadTransitionControl x:Name="TransitionControl" SnapsToDevicePixels="True" Margin="130,124,100,184">
            <telerik:RadTransitionControl.ContentTemplate>
                <DataTemplate>
                    <StackPanel>
                        <WrapPanel Orientation="Horizontal">
                            <WrapPanel.Resources>
                                <Style TargetType="{x:Type Image}">
                                    <Setter Property="Margin" Value="10,10" />
                                </Style>
                            </WrapPanel.Resources>
                            <Image Height="250" Width="180" DataContext="{Binding}" Source="/Kintrol;component/Images/300.jpg" />
                            <Image Source="Images/1.jpg" Height="250" Width="180" />
                            <Image Source="Images/2.jpg" Height="250" Width="180" />
                            <Image Source="Images/3.jpg" Height="250" Width="180" />
                            <Image Source="Images/4.jpg" Height="250" Width="180" />
                            <Image Source="Images/5.jpg" Height="250" Width="180" />
                            <Image Source="Images/6.jpg" Height="250" Width="180" />
                            <Image Source="Images/7.jpg" Height="250" Width="180" />
                            <Image Source="Images/8.jpg" Height="250" Width="180" />
                            <Image Source="Images/9.jpg" Height="250" Width="180" />
                        </WrapPanel>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadTransitionControl.ContentTemplate>
            <telerik:RadTransitionControl.Transition>
                <telerik:SlideAndZoomTransition />
            </telerik:RadTransitionControl.Transition>
        </telerik:RadTransitionControl>
        <Image Source="Images/next.png" Margin="1134,332,12,359"  />
        <Image Source="Images/previous.png" Margin="12,262,1134,334" />
Miroslav Nedyalkov
Telerik team
 answered on 21 Sep 2011
2 answers
170 views
I have a RadGridView with 30000 items, few columns need conditional formatting. One is simple - all above 10.0 red, other are more complex - based on few properties and ranges. Should i use value converters or StyleRule? Which one is faster? Is it depend based on complexity or amount of conditions?
Krzysztof
Top achievements
Rank 1
 answered on 21 Sep 2011
1 answer
334 views
Hi!
A RadRibbonButton has the property RibbonBar:KeyTipService.AccessText.
If you for some reason want to Hide/Collapse the button the AccessText will still be visible in the application!
A ribbongroup with two buttons where one of them is collapsed/hidden will display two AccessText values
(one over the button that is visible and one one over the ribbongroup border)

This means that a user can open up windows/forms or perform actions that he should not be allowed to acccess!

Please advice on how to avoid this. Do I have to remove the property on every button that has Visibility=Collpased or Hidden,
or is there another way to solve this?

Petar Mladenov
Telerik team
 answered on 20 Sep 2011
4 answers
179 views

Hi,

 

I have a RadGridview that contains a number of data columns and a  custom column , which is basically a GridViewDataColumn user control that consists of a textbox and a button.  If the user is editing a cell in one of the data column and then immediately clicks on the textbox in the custom column, the pervious cell is still on edit mode and the binding is not committed ( as the way if the user tabs always from the cell).  How can I have the other cell updating the  target binding if the user click on the texts box within the custom control.

 

Cheers

Perlom
Top achievements
Rank 1
 answered on 20 Sep 2011
3 answers
150 views
Hi

[reproduce and phenomenon]
Bind the RadSlider's SelectionStart/SelectionEnd to Application's DependencyProperty.
When Slider's Thumb is dragged out of the control, values which exceed Minimum/Maximum
Property are substituted into the Property.

This problem did not occur in the Q1 2011.
 
If there is any way to avoid the above phenomenon, please let me know.

  • RadControl for WPF (Version: 2011.2.712.40)
  • OS:Windows7 Ultimate 64 bit
  • VisualStudio 2010 SP1

[VS Project]
RadSliderTest Project

[XAML]
<Window
    x:Class="RadSliderTest.MainWindow"
    Title="RadSlider TEST" Width="640" Height="320"
    Background="#FF393838" TextBlock.Foreground="White" >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="48"/>
            <RowDefinition Height="Auto" MinHeight="32"/>
            <RowDefinition Height="Auto" MinHeight="48"/>
            <RowDefinition Height="Auto" MinHeight="32"/>
            <RowDefinition Height="Auto" MinHeight="48"/>
            <RowDefinition Height="Auto" MinHeight="32"/>
        </Grid.RowDefinitions>
         
        <TextBlock Margin="8,8,8,2" Text="RadSlider(SelectionRangeEnable, Minimun:0.0, Maximum1.0) " VerticalAlignment="Bottom" FontSize="16" FontWeight="Bold"/>
        <telerik:RadSlider x:Name="radSlider" Margin="8" VerticalAlignment="Center"
            SelectionStart="{Binding RangeBegin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,
                        RelativeSource={RelativeSource AncestorType={x:Type Window}} }"
            SelectionEnd="{Binding RangeEnd, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,
                        RelativeSource={RelativeSource AncestorType={x:Type Window}} }"
            IsSelectionRangeEnabled="True" Grid.Row="1"/>
 
        <TextBlock Margin="8,8,8,2" Grid.Row="2" Text="MainWindow DependencyProperty Binding" VerticalAlignment="Bottom" FontSize="16" FontWeight="Bold"/>
        <Grid Margin="8" Grid.Row="3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
 
            <TextBlock Margin="8" Text="RangeBegin" VerticalAlignment="Center" HorizontalAlignment="Right"/>
            <TextBlock Margin="8" Grid.Row="1" TextWrapping="Wrap"
                Text="{Binding RangeBegin, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,
                        RelativeSource={RelativeSource AncestorType={x:Type Window}} }"
                VerticalAlignment="Center" Grid.Column="1" Foreground="Black" Background="White" />
            <TextBlock Margin="8" Text="RangeEnd" VerticalAlignment="Center" Grid.Column="2" HorizontalAlignment="Right" />
            <TextBlock Margin="8" Grid.Row="1" TextWrapping="Wrap"
                Text="{Binding RangeEnd, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged,
                        RelativeSource={RelativeSource AncestorType={x:Type Window}} }"
                VerticalAlignment="Center" Grid.Column="3" Foreground="Black" Background="White" />
        </Grid>
 
        <TextBlock Margin="8,8,8,2" Grid.Row="4" Text="ControlBinding" VerticalAlignment="Bottom" FontSize="16" FontWeight="Bold"/>
        <Grid Margin="8" Grid.Row="5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="120" />
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Margin="8" Text="SelectionStart" VerticalAlignment="Center" HorizontalAlignment="Right"/>
            <TextBlock Margin="8"
                Text="{Binding SelectionStart, ElementName=radSlider}"
                VerticalAlignment="Center" Grid.Column="1" Background="White" Foreground="Black" />
            <TextBlock Margin="8" Text="SelectionEnd" VerticalAlignment="Center" Grid.Column="2" HorizontalAlignment="Right"/>
            <TextBlock Margin="8"
                Text="{Binding SelectionEnd, ElementName=radSlider}"
                VerticalAlignment="Center" Grid.Column="3" Background="White" Foreground="Black" />
        </Grid>
    </Grid>
</Window>

[CS]
using System.Windows;
 
namespace RadSliderTest
{
    public partial class MainWindow : Window
    {
        #region [RangeBegin] DependencyProperty
        public double RangeBegin
        {
            get { return (double)GetValue(RangeBeginProperty); }
            set { SetValue(RangeBeginProperty, value); }
        }
        public static readonly DependencyProperty RangeBeginProperty =
            DependencyProperty.Register("RangeBegin", typeof(double), typeof(MainWindow), new PropertyMetadata(0.0));
        #endregion
 
        #region [RangeEnd] DependencyProperty
        public double RangeEnd
        {
            get { return (double)GetValue(RangeEndProperty); }
            set { SetValue(RangeEndProperty, value); }
        }
        public static readonly DependencyProperty RangeEndProperty =
            DependencyProperty.Register("RangeEnd", typeof(double), typeof(MainWindow), new PropertyMetadata(1.0));
        #endregion
 
        public MainWindow()
        {
            InitializeComponent();
        }
    }
}
Takashi Nimura
Top achievements
Rank 1
 answered on 20 Sep 2011
3 answers
225 views
Hello,

I have problem with RadColumnSparkline with RadTimebar.
It seems like the bars don't placed in the correct location.

I've looked in the thread "Data is not display in correct time location" and there's an example there for RadLinearSparkline with RadTimebar, I tried that example and the result was correct, but when I had changed the control from RadLinearSparkline to RadColumnSparkline, I saw some shifting in the bars.

Do I need to do some extra modifications for using RadColumnSparkline?

(I tried with Telerik RadControls for WPF 2011 Q2 2011.2.0712 & 2011.2.0823)


Thanks
Missing User
 answered on 20 Sep 2011
3 answers
78 views
Hi,

I've got a nullpointer exception in AppointmentItem.EnsureSelection method. The occurrenceInfo is null.

void EnsureSelected()
{
    if (!this.IsSelected)
    {
        this.ScheduleView.UpdateSelectionOnMouseButton(this.occurrenceInfo.Occurrence, this.ActualRange, false, true, true, false);
    }
}

In the mouse handlers the occurrenceInfo is checked against being null:

private void AppointmentItemMouseRightButtonDown(object sender, MouseButtonEventArgs e)
    {
        if (this.ScheduleView != null && this.occurrenceInfo != null)
        {
            this.ScheduleView.UpdateSelectionOnMouseButton(this.occurrenceInfo.Occurrence, this.ActualRange, false, false);
            e.Handled = true;
        }
    }

    private void AppointmentItemMouseRightButtonUp(object sender, MouseButtonEventArgs e)
    {
        if (this.ScheduleView != null && this.occurrenceInfo != null)
        {
            this.ScheduleView.UpdateSelectionOnMouseButton(this.occurrenceInfo.Occurrence, this.ActualRange, false, true);
            e.Handled = false;
        }
    }

Could you fix this?
Thx,
Nico
Nico
Top achievements
Rank 1
 answered on 20 Sep 2011
1 answer
114 views
Hi,

I have just upgraded my Telerik from V2010.3.1314.35 to V2011.2.712.35 and I realized that the "DisplayDateChanged" event was remove and I found nothing about this change.

Can someone give me informations about this fix: Why this change was made, In which version this fix took place, etc...???

Thank's
Konstantina
Telerik team
 answered on 20 Sep 2011
1 answer
144 views
Hi,

I've attached an image which hopefully helps me to better describe my issue:
image

I need to enable drag and drop only for and within a single tree item.
So each content element within a tree item should only be drag-&dropable within the same item.
The tree items itself ( cars, trucks, etc.) shoudn't be draggable at all.

I'm having trouble to prevent a content drag&drop operation from one tree item to another one ( e.g (2) => (3)).

I would be glad for some help.

Thanks in advance

Thorsten

Kiril Stanoev
Telerik team
 answered on 20 Sep 2011
1 answer
487 views
 
I am trying to bind the background of the row to a variable in the datasource. I cannot seem to get it to work.
I am including the Xaml and Xaml.cs code to see if you can see what I am missing.

Reason for trying to bind to a variable is because I have a validate button in my program. It will return the ID of the invalid row
that will be highlighted in the treelistview... (the RowBGColor would be set to yellow ).


using System.Collections.ObjectModel;
using System.Windows;
using System.Drawing;
 
namespace TelerikRowBackground
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private int rowIndex = 1;
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Highlight Row: " + rowIndex);
             
            //TODO: Change row background for rowIndex to Yellow.
            // And reset previous hightlighted row.
 
 
            if(rowIndex == 3)
            {
                rowIndex = 1;
            }
            else
            {
                rowIndex++;
            }
        }
    }
 
    public class ViewModel
    {
        public ObservableCollection<Model> AllData
        {
            get
            {
                return new ObservableCollection<Model>()
                           {
                               new Model()
                                   {
                                       ID = 1,
                                       RowBGColor = Color.Red,
                                       Property1 = "Test1.1",
                                       Property2 = "Test2.1",
                                       Property3 = "Test3.1",
                                       Children = new ObservableCollection<Model>()
                                                      {
                                                          new Model()
                                                              {
                                                                  ID = 2,
                                                                  RowBGColor = Color.Yellow,
                                                                  Property1 = "Test1.2",
                                                                  Property2 = "Test2.2",
                                                                  Property3 = "Test3.2",
                                                                  Children = new ObservableCollection<Model>()
                                                                                 {
                                                                                     new Model()
                                                                                         {
                                                                                             ID = 3,
                                                                                             RowBGColor = Color.Green,
                                                                                             Property1 = "Test1.3",
                                                                                             Property2 = "Test2.3",
                                                                                             Property3 = "Test3.3"
                                                                                         }
                                                                                 }
                                                              }
                                                      }
                                   }
                           };
            }
        }
    }
 
    public class Model
    {
        public int ID { get; set; }
        public string Property1 { get; set; }
        public string Property2 { get; set; }
        public string Property3 { get; set; }
        public Color RowBGColor { get; set; }
        private ObservableCollection<Model> _children;
        public ObservableCollection<Model> Children
        {
            get { return _children ?? (_children = new ObservableCollection<Model>()); }
            set { _children = value; }
        }
    }
}



<Window x:Class=
"TelerikRowBackground.MainWindow"
        xmlns:local="clr-namespace:TelerikRowBackground" Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <local:ViewModel x:Key="MyViewModel"/>
    </Window.Resources>
 
    <DockPanel  DataContext="{StaticResource MyViewModel}">
        <telerik:RadTreeListView Name="radTreeListView1"
                                 DockPanel.Dock="Top"
                                 Margin="5,5,0,0"
                                 AutoGenerateColumns="False"                
                                 ItemsSource="{Binding AllData}"
                                 VerticalAlignment="Top"
                                 HorizontalAlignment="Left"
                                 IsFilteringAllowed="False"
                                 telerik:StyleManager.Theme="Windows7"
                                 EnableColumnVirtualization="True"
                                 EnableRowVirtualization="True"
                                 AutoExpandGroups="True" >
 
            <telerik:RadTreeListView.ItemContainerStyle>
                <Style TargetType="telerik:GridViewRowItem">
                    <Setter Property="Foreground" Value="{Binding RowBGColor}" />
                </Style>
            </telerik:RadTreeListView.ItemContainerStyle>
 
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
            </telerik:RadTreeListView.ChildTableDefinitions>
 
            <telerik:RadTreeListView.Columns>
                <telerik:GridViewDataColumn x:Name="idColumn" DataMemberBinding="{Binding ID, Mode=TwoWay }" Header="ID" />
                <telerik:GridViewDataColumn x:Name="prop1Column" DataMemberBinding="{Binding Property1, Mode=TwoWay }" Header="Property 1" />
                <telerik:GridViewDataColumn x:Name="prop2Column" DataMemberBinding="{Binding Property2, Mode=TwoWay }" Header="Property 2" />
                <telerik:GridViewDataColumn x:Name="prop3Column" DataMemberBinding="{Binding Property3, Mode=TwoWay }" Header="Property 3" />
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
        <Button DockPanel.Dock="Bottom" Height="50" Click="Button_Click" >Click to Highlight Row</Button>
    </DockPanel>
</Window>
Pavel Pavlov
Telerik team
 answered on 20 Sep 2011
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?