Telerik Forums
UI for WPF Forum
7 answers
130 views
Hello,

I recently got a task to make an item in the carousel grow when the IsMouseOver property is true. I can get the item to grow but since its contained inside of a scrollviewer i cant see the entire item when it grows. i did get it to work via popup but i was wondering if you had any other ideas on how this could be accomplished other than making the scrollviewer grow too. we'd like that to stay the same size.

I also got it to do exactly what i wanted using the RadCarouselPanel but when i have say... 10,000 records to display loading time becomes an issue.

here is the usercontrol I'm populating the carousel with

<UserControl x:Class="WpfApplication1.CarouselItem" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    MouseDown="UserControl_MouseDown" 
    Width="120" > 
    <Grid> 
        <Grid.RenderTransform> 
            <ScaleTransform ScaleX="1" ScaleY="1" /> 
        </Grid.RenderTransform> 
        <Grid.Style> 
            <Style TargetType="Grid"
                <Style.Triggers> 
                    <Trigger Property="IsMouseOver" Value="True"
                        <Trigger.EnterActions> 
                            <BeginStoryboard> 
                                <Storyboard> 
                                    <DoubleAnimation 
                                        Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleX)" 
                                        To="2"  
                                        BeginTime="0:0:0.5" 
                                        Duration="0:0:0.3"/> 
                                    <DoubleAnimation 
                                        Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)" 
                                        To="2"  
                                        BeginTime="0:0:0.5" 
                                        Duration="0:0:0.3"/> 
                                </Storyboard> 
                            </BeginStoryboard> 
                        </Trigger.EnterActions> 
                        <Trigger.ExitActions> 
                            <BeginStoryboard> 
                                <Storyboard> 
                                    <DoubleAnimation 
                                        Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleX)" 
                                        To="1" 
                                        Duration="0:0:0.3"/> 
                                    <DoubleAnimation 
                                        Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)" 
                                        To="1"  
                                        Duration="0:0:0.3"/> 
                                </Storyboard> 
                            </BeginStoryboard> 
                        </Trigger.ExitActions> 
                    </Trigger> 
                </Style.Triggers> 
            </Style> 
        </Grid.Style> 
        <Border 
            CornerRadius="5" 
            BorderBrush="Black" 
            BorderThickness="2"
            <Image Source="pics\GreenDoor.png" Stretch="Fill" /> 
        </Border> 
    </Grid> 
</UserControl> 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Data; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Imaging; 
using System.Windows.Navigation; 
using System.Windows.Shapes; 
 
namespace WpfApplication1 
    /// <summary> 
    /// Interaction logic for UserControl1.xaml 
    /// </summary> 
    public partial class CarouselItem : UserControl 
    { 
        public delegate void ItemsMouseDown(object sender); 
        public event ItemsMouseDown ItemMouseDown; 
 
        public CarouselItem() 
        { 
            try 
            { 
                InitializeComponent(); 
            } 
            catch (Exception ex) 
            { 
                MessageBox.Show(ex.ToString()); 
            } 
        } 
 
        private void UserControl_MouseDown(object sender, MouseButtonEventArgs e) 
        { 
            if (ItemMouseDown != null
                ItemMouseDown(this); 
        } 
    } 
 

any ideas would be helpful
thanks much,
~Boots
Boots
Top achievements
Rank 1
 answered on 06 Jan 2010
1 answer
119 views
I made an drag drop based on example "158684_dragdrop-reorder-grid",  Two grids one grid is drag from only, the other is drag to, and drag-drop inside the grid (move items).

It kinda works.

But  If I drag a item from row #10 (move) a item to row #5, and then drag another row to row#10 (where the first was before), Tool tip show me the "old" item that is no longer there and "BetweenItemsCue line" don't show. Looks like the dragdrop don't see the updated collection, just the collection that was when we loaded the grid, I use ObservableCollection.

And Drag-Drop tooltip, I only get Insert "before", "after" is never showed... 

I'm stuck, any suggestions?
Vlad
Telerik team
 answered on 06 Jan 2010
1 answer
90 views
Hello,

i am using q3 version of wpf controls. I am finding a weird behaviour-  when i group flds, horizontal and vertical scroll bar disappears.

Please let me know if i am missing anything here or is it a bug?

Regards,
Sandy

i have set these properties:

ScrollViewer.HorizontalScrollBarVisibility

 

="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible"

 

 

ScrollViewer.CanContentScroll="True"

and this is grouped event handler:

 

 

private void WipGrid_Grouping(object sender, GridViewGroupingEventArgs e)

 

{

 

try

 

{

 

var countFunction = new CountFunction();

 

countFunction.Caption =

"Total records: ";

 

countFunction.FunctionName =

"Count";

 

e.GroupDescriptor.AggregateFunctions.Add(countFunction);

 

}

 

Missing User
 answered on 06 Jan 2010
1 answer
116 views
Hi all,

I'm trying to use a List of custom class to fill the itemsSource of RadCarousel.

This is the code of Page1.xaml:

<Page x:Class="Page1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    xmlns:carousel="clr-namespace:Telerik.Windows.Controls.Carousel;assembly=Telerik.Windows.Controls.Navigation" 
    Title="Page1"
    <Grid> 
        <telerik:RadCarousel x:Name="carPacientes" HorizontalAlignment="Stretch" 
                VerticalAlignment="Stretch" Background="Black" AutoGenerateDataPresenters="False" Foreground="White"
            <telerik:RadCarousel.Resources> 
                <Style TargetType="telerik:CarouselItem"
                    <Setter Property="Template"
                        <Setter.Value> 
                            <ControlTemplate TargetType="telerik:CarouselItem"
                                <Label Content="{Binding Path=Apellidos}" FontSize="12" Foreground="Black" Background="Aqua" /> 
                            </ControlTemplate> 
                        </Setter.Value> 
                    </Setter> 
                </Style> 
            </telerik:RadCarousel.Resources> 
        </telerik:RadCarousel> 
    </Grid> 
</Page> 
 

And this is the code to fill the RadCarousel Page1.xaml.vb:

Imports MDOL.Business.Logic 
 
Partial Public Class Page1 
 
    Public Shared opcion As String 
 
    Public Sub New() 
        InitializeComponent() 
 
        Dim pacs As List(Of Paciente) = New List(Of Paciente) 
 
        Dim pac As Paciente = Nothing 
 
        For i = 1 To 10 
 
            pac = New Paciente 
            pac.IdPaciente = Convert.ToString(i) 
 
            pac.Nombre = "Gerard" 
            pac.Apellidos = "Subirana" 
 
            pacs.Add(pac) 
            pac = Nothing 
        Next 
 
        Me.carPacientes.ItemsSource = pacs 
 
    End Sub 
 
End Class 

When I run the application appears 10 radcarousel items but the labels with the property Apellidos still empty... what's wrong?

Thank's in advance.

Gerard
Rossen Hristov
Telerik team
 answered on 06 Jan 2010
3 answers
390 views
Hi Can anyone please guide me to a creating a simple pie chart with legend in the code behind in C# or have some code.

Basically I have a datatable which returns the following data and would like to draw a pei chart:

Exercise Type A: 30
Exercise Type B : 60
Exercise Type C : 10

All the examples I have seen so far is for bar graphs.

Many Thanks
shahab
Giuseppe
Telerik team
 answered on 06 Jan 2010
7 answers
306 views
Hello,
I'm evaluating the GridView by writing a small app to test it.
In the app I'm using 2 grids: the RadGridView on one side of the view and Xceed's DataGridControl on the other.
Both grid's ItemsSource have the same instance of ObservableCollection<Order> (from NW db) that is set from the code behind.

One thing that is immidiately noticable, even with a small amount of records (100),
is when scrolling vertically - the RadGridView seems to take a while to update the view (compared to Xceed's grid).
whether if I drag the scroller up and down or if I click on it to perform a big scroll step.

My XAML for the RadGridView looks like this:

<telerik:RadGridView
    telerik:StyleManager.Theme="Vista" 
    
IsReadOnly="True"
    ScrollMode
="RealTime" />

 

Is this a known behavior or am I missing something?
Is there a way to fix this?

Thanks,
David

Vlad
Telerik team
 answered on 06 Jan 2010
5 answers
329 views
I'm trying to bind the gridview to an ObservableCollection<MyListItem>. In my collection I have a mixture of items that inherit from MyListItem e.g. MyAppleItem and MyOrangeItem.  Fields bound in the grid are bound to properties exposed in the base MyListItem type. The binding works fine when the colleciton contains a list with a single type in it but as soon as I have a collection with some MyAppleItem and MyOrangeItem I get an argument exception:

{"The value \"MyAppleItem\" is not of type \"MyOrangeItem\" and cannot be used in this generic collection.\r\nParameter name: value"}

I need the items in their original types as I use a converter on one of the columns etc.  How do I make use of polymorphism with the grid binding?
Stefan Dobrev
Telerik team
 answered on 06 Jan 2010
1 answer
210 views
Hi

I have a RadGridView containing some "command"- columns and some information columns.

Like this:

Name Adress IsOnline Edit Delete
John Anystreet 10a Yes [Button] [Button]

When i copy a Column to Clipboard the two "command"-columns are copied too. 

How can i change the grid that these columns are ignored when the row is copied?
Vlad
Telerik team
 answered on 05 Jan 2010
5 answers
181 views

Hi,

I am using RADTreeview and  I would like to bind the heterogeneous  data as the hierarchal structure. For e.g. I want to bind List<A> which has List<B> and List<C> as its children. 

Regards,
-Kshama

Kiril Stanoev
Telerik team
 answered on 05 Jan 2010
1 answer
48 views
What is the best way to handle this situation?

I have a master grid and its child data is accessed through the RowDetailsTemplate which is pointing to a customized UserControl. Inside the UserControl is a tab control with a grid inside each tab. When a child grid is in edit mode and the form is closed, the grid's rowEditEnded event doesn't fire. The rowEditEnded event is where I tell my program to post/save the row's data.

So, how am I suppose to save the data of that row? Should I expose a function of the user control and have the WPF call it when closing?

Thank You.
Stefan Dobrev
Telerik team
 answered on 05 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?