Telerik Forums
UI for WPF Forum
1 answer
129 views
I've downloaded and opened the example project provided by Kaloyan in reference in this link:
Page Animation in a WPF Application

I am new to WPF and Animation. I'm able to follow through the code and understand it quite a bit but I wanted the animation to do the opposite, which I got stuck on. Although Albert from the thread posted code to reverse the animation, there wasn't the same effect as the animation included in the project. The animation provided had the effect of moving right to left. Can anyone please provide me with the animation to do the opposite, please? Here again is the sample animation (right to left) taken from the code.

public void BeginRight(FrameworkElement mockItem1, Grid container, FrameworkElement newPage)
  {
   this.Container = container;
   this.PageWidth = container.ActualWidth;
   this.item1 = mockItem1;
   this.item2 = newPage;
 
   this.Container.Children.Add(this.item1);
 
   var width = PageWidth;
 
   var scaleFactor = 0.8;
   var halfSrink = (1.0 - scaleFactor) / 2;
 
   this.Container.Children.Add(this.mask1);
   this.Container.Children.Add(this.mask2);
 
   var scaleDownSpline = new Spline(0.504000008106232, 0.256000012159348, 0.458999991416931, 1);
   var moveSpline = new Spline(0.247999995946884, 0, 1, 1);
   var scaleUpSpline = new Spline(0.321000009775162, 0, 0.45100000500679, 1);
   var spacing = 15.0;
 
   this.animation = this.item1
    .Animate()
    .With(this.mask1)
     .EnsureDefaultTransforms()
     .Origin(0, 0.5)
     .Scale(0, 1, 0.2, 1, 0.7, scaleFactor)
      .Splines(2, scaleDownSpline)
     .MoveX(0.7, 0, 1.365, (-width * (scaleFactor - halfSrink)) - spacing, 1.9, (-width * scaleFactor) - spacing)
      .Splines(1, moveSpline)
      .Splines(2, scaleUpSpline)
    .Without(this.item1)
     .Opacity(0, 0, 0.2, 0, 0.7, 1)
      .Splines(1, scaleDownSpline)
    .Animate(this.mask2)
     .Opacity(1.35, 1, 1.9, 0)
      .Splines(scaleUpSpline)
    .With(this.item2)
     .EnsureDefaultTransforms()
     .Origin(0.5, 0.5)
     .Scale(0, scaleFactor, 1.365, scaleFactor, 1.9, 1)
      .Splines(1, moveSpline)
      .Splines(2, scaleUpSpline)
     .MoveX(0.0, ((scaleFactor + halfSrink) * width) + spacing, 0.2, ((scaleFactor + halfSrink) * width) + spacing, 0.7, ((scaleFactor - halfSrink) * width) + spacing, 1.365, 0)
      .Splines(2, scaleDownSpline)
      .Splines(3, moveSpline)
    .Instance;
 
   this.animation.SpeedRatio = 755.0 / width * 1.5;
 
   this.isRunning = true;
 
   this.animation.Completed += (sender, e) =>
   {
                this.TransitionAnimationCompleted(this, new TransitionEventArgs(item2));
 
    Container.Children.Remove(mask1);
    Container.Children.Remove(mask2);
    RemoveVisualBrush();
    Container.Children.Remove(item1);
    item1 = null;
    item2 = null;
   };
 
   this.animation.Begin();
  }
 

Huas
Top achievements
Rank 1
 answered on 01 Nov 2012
16 answers
1.3K+ views
in my listboxes I use listbox.SelectedIndex++, I want to select the next row in my WPF GridView (I have paging arrows at the top that will navigate through the grid)
Dilum
Top achievements
Rank 1
 answered on 01 Nov 2012
1 answer
634 views
I have a RadComboBox bound to an ObservableCollection. The collection is modified and cleared pragmatically (via various user interactions).

I'm looking for a XAML friendly solution that will set the SelectedIndex to 0 when going from no items (no selection) to having items.

I've tried simply setting SelectedIndex=0 but that doesn't work. (I get no selection).

-Mike.




Vladi
Telerik team
 answered on 01 Nov 2012
3 answers
331 views
Hi,

The image editor seems to suit my needs, but I need certain functionality that isn't there. Is it possible to extend your RadImageEditor class? More specifically, I want to add the following:
  1. Zooming should use Nearest Neighbor instead of bilinear.
  2. Image overlay. E.g. Some text printed above the image.
  3. Additional input:
    • Mousewheel should zoom instead of scrolling.
    • Horizontal mousewheel scrolling.
    • Left/right mouse click handling.
    • Keyboard commands.

Also, I'm wondering if this control is hardware accelerated. Performance will be crucial in my case. Am I better off using some other image viewer?

Boby
Telerik team
 answered on 01 Nov 2012
5 answers
386 views
Hi,

I have a problem using "paste" in radgridView of 2012.2.607.40. (it Works well of 2011.3.1116.40).

I select 3 rows in Excel,copy them and I want to paste these in  my grid.  I click new row then click paste. I hope that the 3 rows will in the last 3 rows in my grid. it means that these 3 rows will be 3 new rows of my grid. BUT the result is , it will erase the first 3 rows of my current grid. Sometimes il will erasing the last few rows.

For exemple : I have 1,2,3,4 in my grid, each number in a different row (4 rows). Now, i want to paste 5,6,7 in the grid, I click add rows (now I have 1,2,3,4,0 in 5 rows), and click paste, the result that I want is 1,2,3,4,5,6,7, BUT the result is 5,6,7,4,0 .

Here is my grid :   
           <telerik:RadGridView
                SelectionMode="Extended" MaxHeight="150" x:Name="gridView"
                IsReadOnly="{Binding Path=ObjectBase.IsReadOnly, RelativeSource={RelativeSource FindAncestor, AncestorType=sc:GridDesigner}}"
                VerticalAlignment="Top" CanUserDeleteRows="True" RowIndicatorVisibility="Visible"
                CanUserFreezeColumns="False" CanUserInsertRows="True" ShowGroupPanel="False"
                AutoGenerateColumns="True" CanUserSelect="True" SelectionUnit="FullRow"
                ClipboardCopyMode="Cells" ClipboardPasteMode="Default" BorderThickness="0" EnableRowVirtualization="True">
            </telerik:RadGridView>

Then I have tried to use the control of Pasting like this :
private void gridView_Pasting(object sender, GridViewClipboardEventArgs e)
{
    var newItem = this.radGridView1.Items.AddNew();
    this.gridView.SelectedItem = newItem;
}

And also like this:

        private void gridView_Pasting(object sender, Telerik.Windows.Controls.GridViewClipboardEventArgs e)
        {
            this.gridView.Items.MoveCurrentToLast();
        }

but it doesn't work.

Thank you in advance for your help.

Ricardo Chorro.
Maya
Telerik team
 answered on 01 Nov 2012
1 answer
143 views
Hi,

I am using Q3 Version.
When i create GanttView as userControl and paste all OfficeBlue Theme to the resource of the userControl , i cant see the designer cause i get an exception like : " is not a valid value for the 'Telerik.Windows.Controls.Scheduling.ZIndexManager.ZIndex' property on a setter.
I dont understand what is the problem about the " in the telerik:ZIndexManager Tag.

Thanks
Masha
Telerik team
 answered on 01 Nov 2012
3 answers
128 views
Hello,

This is my first time writing you here...and i think that your help is outstanding.

I have simple question, its maybe something basic that i don't understand..

If i put in docking area simple rad pane, with command binding for open...Open button will always be disabled.

/////////////////////////////////////////////////////////////
<telerik:RadPane Header="Pane 1">
                            <telerik:RadPane.CommandBindings>
                                <CommandBinding Command="Open" Executed="CommandBinding_Executed" CanExecute="CommandBinding_CanExecute"/>
                            </telerik:RadPane.CommandBindings>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <telerik:RadToolBar MaxHeight="40" Grid.Row="0">
                                    <Button Command="telerik:RadDockingCommands.Close" Content="Close" MaxHeight="20" MaxWidth="40"/>
                                    <Button Command="Open" Content="Open" MaxHeight="20" MaxWidth="40"/>
                                </telerik:RadToolBar>
                            </Grid>
                        </telerik:RadPane>

private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            e.Handled = true;
        }


        private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
            e.Handled = true;
        }


////////////////////////////////////////

Thank you in advance
Vladi
Telerik team
 answered on 01 Nov 2012
1 answer
137 views

Hello,

way does the binding on the Visibility property not work? 

below my code, I'm using RadControls for WPF Q2 2012 SP1\Binaries\WPF40\Telerik.Windows.Controls.Charting.dll

thanks!

<telerik:RadChart x:Name="RCVUtilizationAverage" Grid.Column="0" >
     <telerik:RadChart.SeriesMappings>
         <telerik:SeriesMapping LegendLabel="Plan-Auslastung" ItemsSource="{Binding PlanUtilizations}">
              <telerik:SeriesMapping.SeriesDefinition>
                   <telerik:LineSeriesDefinition ShowItemLabels="False" Visibility="{Binding PlanUtilizationsVisibility, Mode=TwoWay}" />
               </telerik:SeriesMapping.SeriesDefinition>
....

private SeriesVisibility _PlanUtilizationsVisibility = SeriesVisibility.Visible;
public SeriesVisibility PlanUtilizationsVisibility { 
    get { return _PlanUtilizationsVisibility; } 
    set { _PlanUtilizationsVisibility = value; } 
}



Nikolay
Telerik team
 answered on 01 Nov 2012
1 answer
175 views
In the application I'm currently developing for, we are using the the WPF RadRichTextBox as an Html editor, in which documents are synced to a server and accessed from many different computers.

In order to handle embedded images (ImageInlines), we associate each image with a content id number, which is stored on the server.  My problem comes into effect when the user downloads a document (along with it's embedded images) from the server, since the content id number is stored in place of the src attribute on the Html <image> tag. The Telerik control parses the image tag fine, and simple displays an image placeholder due to the content id being an invalid path, so I loop through the Document's ImageInlines and replace the src attribute with a proper filepath:
           
IEnumerable<ImageInline> inlines = document.EnumerateChildrenOfType<ImageInline>();
foreach (ImageInline image in inlines)
{
    image.UriSource = new Uri(GetLocalPath(image.UriSource.AbsolutePath);
}

The problem then is that the RichTextBox control doesn't seem to update to show the image at the given path (even though I have verified, by exporting and inspecting the Html, that the src attribute points to a valid image file).  Is there some sort of "force update" that I need to perform, or perhaps a step I'm missing? Or is there possibly just a better way of doing something along these lines?

Thanks,
Chris Covert
Petya
Telerik team
 answered on 31 Oct 2012
3 answers
338 views
While creating corresponding WPF libraries for our Sliverlight ones, I ran across an issue. One of our views uses a RadTreeView with HierarchicalDataTemplates. In Silverlight, it works fine using the Telerik.Windows.Controls.HierarchicalDataTemplate. That same view will not compile in the WPF assembly because Telerik.Windows.Controls.HierarchicalDataTemplate does not seem to exist for WPF. I know there's a Windows HierarchicalDataTemplate, but I can't seem to find the Telerik one anywhere. 

If this type does not exist, your documentation for ItemTemplateSelector might need to be updated as well:
http://www.telerik.com/help/wpf/radtreeview-populating-with-data-item-template-selector.html

That article shows it's usage, but again, I can't find that type anywhere in the Telerik WPF assemblies. I'm using the latest 2011 Q3 release, btw.

Thanks in advance...
-Tony
Tina Stancheva
Telerik team
 answered on 31 Oct 2012
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?