Telerik Forums
UI for WPF Forum
1 answer
92 views
i have a problem for radcarousel is that i wish to click the GO button(radbutton1) and show me the "image.png" in radcarousel and the BACK(radbutton2) button to show me the "U-turn_icon.png" in radcarousel. Because at later part i wish to make a 3rd button also click to show me another different image example "clipart_map.gif".

XAML CODE
<Window x:Class="WpfApplication2.MainWindow"
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation"
        Title="MainWindow" Height="886" Width="1024" Loaded="Window_Loaded">
     
    <Grid Height="1005">
        <telerik:RadButton Content="Go" Height="34" HorizontalAlignment="Left" Margin="12,429,0,0" Name="Gobutton" VerticalAlignment="Top" Width="80" Click="radButton1_Click" />
        <telerik:RadButton Content="Back" Height="42" HorizontalAlignment="Left" Margin="12,501,0,0" Name="Backbutton" VerticalAlignment="Top" Width="80" Click="radButton2_Click" />
        <telerik:RadToggleButton Content="Lock" Height="54" HorizontalAlignment="Left" IsChecked="False" IsThreeState="False" Margin="12,344,0,0" Name="Lockbutton" VerticalAlignment="Top" Width="80" />
        <telerik:RadComboBox HorizontalAlignment="Left" Margin="12,47,0,0" Name="TherapiesCombo" VerticalAlignment="Top" Width="92" IsEnabled="True">
            <telerik:RadComboBoxItem Content="smileyface" Name="smileyface" Selected="smileyface_Selected" />
            <telerik:RadComboBoxItem Content="Uturn" Name="Uturn" Selected="Uturn_Selected" />
            <telerik:RadComboBoxItem Content="Item 3" Name="img"/>
        </telerik:RadComboBox>
        <telerik:RadComboBox HorizontalAlignment="Left" Margin="12,196,0,0" Name="CategoriesCombo" VerticalAlignment="Top" Width="92">
            <telerik:RadComboBoxItem Content="Item 1" />
            <telerik:RadComboBoxItem Content="Item 2" />
            <telerik:RadComboBoxItem Content="Item 3" />
        </telerik:RadComboBox>
        <Label Content="Categories" Height="28" HorizontalAlignment="Left" Margin="12,172,0,0" Name="label1" VerticalAlignment="Top" />
        <Label Content="Types of Therapies:" Height="28" HorizontalAlignment="Left" Margin="12,23,0,0" Name="label2" VerticalAlignment="Top" />
        <ScrollViewer CanContentScroll="True" ScrollChanged="ScrollViewer_ScrollChanged" Margin="144,0,0,154">
            <telerik:RadCarousel Name="radCarousel1" Background="Black" Opacity="1">
                 
            </telerik:RadCarousel>
 
        </ScrollViewer>
        <telerik:RadButton Content="Button" Height="32" HorizontalAlignment="Left" Margin="12,93,0,0" Name="refresh" VerticalAlignment="Top" Width="92" Click="refresh_Click" />
    </Grid>
</Window>

C# Code
namespace WpfApplication2
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        //System.Drawing.Bitmap whypic = WpfApplication2.Properties.Resources.smiley_face_clip_art_20340;
        //bool boollol = false;
 
         
       
        public MainWindow()
        {
            InitializeComponent();
 
            List<Image> myImages = new List<Image>();
            Image myImage = new Image();
            myImage.Source = new BitmapImage(new Uri("/Images/img-thing.png", UriKind.Relative));
            myImages.Add(myImage);
 
 
            Image myImage1 = new Image();
            myImage1.Source = new BitmapImage(new Uri("/Images/clipart_map.gif", UriKind.Relative));
            myImages.Add(myImage1);
 
            Image myImage2 = new Image();
            myImage2.Source = new BitmapImage(new Uri("/Images/image.png", UriKind.Relative));
 
            myImages.Add(myImage2);
 
            Image myImage3 = new Image();
            myImage3.Source = new BitmapImage(new Uri("/Images/smiley_face_clip_art_20340.png", UriKind.Relative));
            
 
            myImages.Add(myImage3);
 
            Image myImage4 = new Image();
            myImage4.Source = new BitmapImage(new Uri("/Images/U-turn_icon.png", UriKind.Relative));
 
            myImages.Add(myImage4);
 
 
             
 
 
            foreach (Image img in myImages)
            {
                this.radCarousel1.ItemsSource = myImages;
            }
 
 
 
            private void radButton1_Click(object sender, RoutedEventArgs e)
        {
            //click and image gone ERROR
            //this.radCarousel1.ItemsSource = new BitmapImage(new Uri("/Images/U-turn_icon.png",UriKind.Relative));
          
            //Only more next by 1 all the time for each click
            //this.radCarousel1.FindCarouselPanel().MoveBy(1);
            this.radCarousel1.ItemsSource = null;
 
            List<Image> myImages = new List<Image>();
            Image myImage = new Image();
            myImage.Source = new BitmapImage(new Uri("/Images/img-thing.png", UriKind.Relative));
            myImages.Add(myImage);
 
 
            Image myImage1 = new Image();
            myImage1.Source = new BitmapImage(new Uri("/Images/clipart_map.gif", UriKind.Relative));
            myImages.Add(myImage1);
 
            Image myImage2 = new Image();
            myImage2.Source = new BitmapImage(new Uri("/Images/image.png", UriKind.Relative));
 
            myImages.Add(myImage2);
 
            Image myImage3 = new Image();
            myImage3.Source = new BitmapImage(new Uri("/Images/smiley_face_clip_art_20340.png", UriKind.Relative));
 
 
            myImages.Add(myImage3);
 
            Image myImage4 = new Image();
            myImage4.Source = new BitmapImage(new Uri("/Images/U-turn_icon.png", UriKind.Relative));
 
            myImages.Add(myImage4);
 
            foreach (Image img in myImages)
            {
                this.radCarousel1.ItemsSource = myImages;
            }
 
            this.radCarousel1.BringDataItemIntoView(this.radCarousel1.Items[2]);
 
           }
        private void radButton2_Click(object sender, RoutedEventArgs e)
        {
            this.radCarousel1.ItemsSource = null;
 
            List<Image> myImages = new List<Image>();
            Image myImage = new Image();
            myImage.Source = new BitmapImage(new Uri("/Images/img-thing.png", UriKind.Relative));
            myImages.Add(myImage);
 
 
            Image myImage1 = new Image();
            myImage1.Source = new BitmapImage(new Uri("/Images/clipart_map.gif", UriKind.Relative));
            myImages.Add(myImage1);
 
            Image myImage2 = new Image();
            myImage2.Source = new BitmapImage(new Uri("/Images/image.png", UriKind.Relative));
 
            myImages.Add(myImage2);
 
            Image myImage3 = new Image();
            myImage3.Source = new BitmapImage(new Uri("/Images/smiley_face_clip_art_20340.png", UriKind.Relative));
 
 
            myImages.Add(myImage3);
 
            Image myImage4 = new Image();
            myImage4.Source = new BitmapImage(new Uri("/Images/U-turn_icon.png", UriKind.Relative));
 
            myImages.Add(myImage4);
 
            foreach (Image img in myImages)
            {     
                this.radCarousel1.ItemsSource = myImages;
            }
 
            this.radCarousel1.BringDataItemIntoView(this.radCarousel1.Items[2]);
    
        }

Maya
Telerik team
 answered on 25 Feb 2011
3 answers
98 views
I posted this originally in another thread but didn't get a response so I thought making a new thread might make sense.

I have a carousel and we have a template setting the contents of the panels.  We have data bound to chart controls that are inside of a carousel, which works great if all of the charts are the same type/size.  Our problem is that we have 6 charts and they don't all have the same amount of data/bars so when the carousel draws, some of the panels are way too wide for the charts inside them.  We would like a way to re-size individual panels to accommodate the different chart sizes.  How can we re-size individual panels if they are being drawn from a data collection?  Is there a way to just set the size of each object in the collection before it gets drawn into the carousel?

Thank you for any help you can provide.
Maya
Telerik team
 answered on 25 Feb 2011
3 answers
210 views
I'm having a problem getting the RadDataPager to work with a collectionviewsource, I have a grid with a number of Telerik controls, arranged something like a card view. This card view has a raddatapager, I have the grids datacontext is set to the raddatapagers pagedsource property.  Everything seems to work, I always get the first record of the collection displayed, but that's it I can't move through the records even though I know others exist.

Does anyone have a simple example that shows how to use the raddatapager with a collectionviewsource ?

Thanks 
Yordanka
Telerik team
 answered on 25 Feb 2011
1 answer
127 views
Hi, I'm using the code of CustomFilterDescriptor on a RadGridView.
The gridview has over 300 records, but when I type a letter Visual Studio throws a Stackoverflow exception, but with less that 100 records it works fine.

Any ideas why? 
Yordanka
Telerik team
 answered on 25 Feb 2011
1 answer
245 views
Hi,

I want to color each line of button with different color based on some condition.How can i achieve this.
For example: say button width is 24,considering each line of button as 1 hour.If i want color first hour with red,3rd hour with orange how can i achieve this.

Tina Stancheva
Telerik team
 answered on 25 Feb 2011
3 answers
112 views
Hi,

I want to handle overlapped markers.
When cursor gets over overlapped markers they should automatically expend, so a user can see each overlapped marker separately. How can I do that?

Regards,
SAMI.
Andrey
Telerik team
 answered on 25 Feb 2011
3 answers
153 views
Hi,

I need to display a calender while the user focus on the textbox. How can I achieve this?
Kaloyan
Telerik team
 answered on 25 Feb 2011
2 answers
76 views
Hi all,

I'm using the grid and would like to be able to group by all columns - I've had it working but it stopped working and I can't figure out why...

To be specific, the grid shows up just fine, but when I try to drag I just get the 'forbidden' symbol over the top area.

I've tried to set IsGroupable=true (even if it's supposed to be default), but it doesn't change anything.

Below is my xaml - any clues?

Thanks,

Anders, Denmark

 <Grid>
        <telerik:RadGridView AutoGenerateColumns="False" x:Name="grid" SelectionMode="Extended" ItemsSource="{Binding CombinationMembers}" Margin="0,0,0,37">
            <telerik:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn Header="Item Parent" DataMemberBinding="{Binding Path=ViewModelBase.ParentItemContext, Mode=OneWay}"  />
                <telerik:GridViewDataColumn Header="Item" DataMemberBinding="{Binding Path=ViewModelBase.DisplayName,Mode=OneWay}"  />
                <telerik:GridViewDataColumn Header="Type" DataMemberBinding="{Binding Path=ViewModelBase.DisplayType,Mode=OneWay}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
        <telerik1:RadButton Content="_Cancel" Height="Auto" HorizontalAlignment="Right" Margin="0,0,53,12" VerticalAlignment="Bottom" IsCancel="True" />
        <telerik1:RadButton Content="_Select" Height="Auto" HorizontalAlignment="Right" Margin="0,0,12,12" VerticalAlignment="Bottom" Command="{Binding App}" Click="RadButton_Click" />
    </Grid>
Anders
Top achievements
Rank 1
 answered on 25 Feb 2011
1 answer
98 views
I'm using the RadTransitionControl in my PRISM application:

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />            
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
           ...         </Grid>

        <Grid Grid.Row="1">
            <ItemsControl>
                <telerik:RadTransitionControl cal:RegionManager.RegionName="{x:Static Environment:RegionNames.MainContentRegion}">
                    <telerik:RadTransitionControl.Transition>
                        <TransitionEffects:PerspectiveRotationTransition />
                    </telerik:RadTransitionControl.Transition>
                    <telerik:RadTransitionControl.Easing>
                        <PowerEase EasingMode="EaseOut" Power="9" />
                    </telerik:RadTransitionControl.Easing>
                </telerik:RadTransitionControl>
            </ItemsControl>
        </Grid>

        <Grid Grid.Row="2">
            ...
        </Grid>
    </Grid>

The problem is that the view that is put into the MainContentRegion doesn't stretch vertically in its parent container. How can I make sure that the control that is put in MainContentRegion has the same height as the parent grid?




Ludwig
Top achievements
Rank 1
 answered on 24 Feb 2011
1 answer
97 views
I have some problems using a custom theme inside a Telerik GridView. When I use the theme, the FilterControl is not working. Please see the attached image.
When I group a column doing drag/drop, the databinding of the Group Panel Item  is missed. Please see the second image.
Vanya Pavlova
Telerik team
 answered on 24 Feb 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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?