Telerik Forums
UI for WPF Forum
0 answers
85 views
hi,
i have a client the LOVES your opening page animation on the WPF Controls Expamles Demo.
was it done with a carousel control?
thanks! 
sivan benmoshe
Top achievements
Rank 1
 asked on 05 Feb 2012
1 answer
119 views
We have Ms. theme look in complete application, The Date picker also has the theme and look, But when datepicker is clicked to select date, the month and year on top shows black in color instead of the theme color which is blue, Any idea?

In the attached pic below. We want to change the forecolor of "February -2012.
Boyan
Telerik team
 answered on 03 Feb 2012
2 answers
87 views
Have the complete application with Microsoft theme. The Radchart legend forecolor needs to be same color as needed. It shows Black right now. How do I change the legend radchart forecolor or keys?
The Legend Items are created dynamically. Pic of what needs changed color attached.
Bhakti
Top achievements
Rank 1
 answered on 03 Feb 2012
0 answers
166 views
hi everybody,
can anyone help me to know how i can set RadGridView.CurrentCellInfo by binding from viewModel in MVVM architecture????
M
Top achievements
Rank 1
 asked on 03 Feb 2012
2 answers
77 views
Hi,

I'm facing into a crazy issue.

Actually i'm using a RadGridView inside a RadDocking Pane. When i resize the window by doubleclick on top header bar of the window, so i pass quickly from normal state to maximized state, i loose some headers and some cells of the RadGridView.

The issue is the same when i play with panes of the docking by dragging it. But if i resize the window by hand slowlly headers and cells reappear !!

Attached, a sample projet and 2 screenshots of the issue.

I'm using the latest internal build 2011.3.1330.40. But the bug is the same with previous versions.
It's a very ennoying bug ...

Any help ?

Screenshots
Sample Project

Thanks.
Vera
Telerik team
 answered on 03 Feb 2012
1 answer
94 views
Hi,

I tried using your ScheduleView with Metro Theme, unfortunately the ViewDefinitions background is set to White for whichever style it is being applied. I am using cosmopolitan theme so I'm not sure which control was inherit from that's why the background is set to White. I tried reproducing this to a empty project and the Metro theme works fine with the Blue and White colors in the Viewdefinitions like Day, Week, Month, Timeline.

I would just like to know what control was used in the ViewDefinitions so I could remove the default style of Cosmopolitan Theme for WPF for the ScheduleView.

Screenshot
Yana
Telerik team
 answered on 03 Feb 2012
0 answers
173 views
I have a Telerik transition control binding to a custom class, The transition control accepts needs an image as input.  Can you please tell me how can i bind explicitly telling the element name which have the image reference. Itemsource is an attached property. I have included the code below. I tried Path=AdImage but it did not worked.

I was using http://blogs.telerik.com/blogs/posts/11-01-11/how-to-create-ad-rotator-with-telerik-transitioncontrol-and-coverflow-control-for-silverlight.aspx  to create an adrotator control.



<telerik:RadTransitionControl  x:Name="radControl" adRotator:AdRotatorExtensions.ItemChangeDelay="0:0:3" 
 adRotator:AdRotatorExtensions.CurrentSelectedIndex="0"
                              adRotator:AdRotatorExtensions.IndexChanged="{Binding TopItemCommand, Mode=OneWay}"
                              adRotator:AdRotatorExtensions.ItemsSource="{Binding ImagePaths, Mode=OneWay,Path=AdImage}"
 VerticalAlignment="Center" 
 HorizontalAlignment="Center" Width="650">
<telerik:RadTransitionControl.Transition>
<telerik:MotionBlurredZoomTransition />
</telerik:RadTransitionControl.Transition>

</telerik:RadTransitionControl>


 public static readonly DependencyProperty ItemsSourceProperty =
    DependencyProperty.RegisterAttached("ItemsSource", typeof(IEnumerable), typeof(AdRotatorExtensions), new PropertyMetadata(null, OnItemsSourceChanged));
    
    private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
    var element = d as FrameworkElement;
       var itemsControl = d as ItemsControl; // this is always null it returns a RadTranisitionControl object which doesnt have DisplayMemberName property
   
    var oldValue = e.OldValue as IEnumerable;
    var newValue = e.NewValue as IEnumerable;
       
           if (element != null)
           {
               if (oldValue != null)
               {
                   // Detach the Ad Rotator functionality.
                   element.Loaded -= OnElementLoaded;
                   element.Unloaded -= OnElementUnloaded;
    
                   // If there is a timer attached, stop it.
                   var timer = GetTimer(element);
                   if (timer != null)
                   {
                       timer.Stop();
                   }
               }
    
               if (newValue != null)
               {
                   // Attach the Ad Rotator functionality.
                   element.Loaded += OnElementLoaded;
                   element.Unloaded += OnElementUnloaded;
    
                   // If the target is an ItemsControl and its ItemsSource is not set, set it.
                   if (itemsControl != null && itemsControl.ItemsSource == null && itemsControl.Items.Count == 0)
                   {
                       itemsControl.ItemsSource = newValue;
                       itemsControl.DisplayMemberPath = "AdImage"; // will never reaches here
                   }
               }
           }
       }
    
    
    private static void OnElementLoaded(object sender, RoutedEventArgs args)
    {
    var element = sender as DependencyObject;
    
    // Create the timer and hook-up to the events.
    var timer = new DispatcherTimer();
    timer.Interval = GetItemChangeDelay(element).TimeSpan;
    SetTimer(element, timer);
    
    timer.Tick += (s, e) => MoveToNextElement(element);
    
    timer.Start();
    
    // Make sure the currently pointed element is selected.
    UpdateCurrentlySelectedItem(element);
    }
    
    private static void UpdateCurrentlySelectedItem(DependencyObject element)
    {
    var contentControl = element as ContentControl;
       
    
    
       var source = GetItemsSource(element);
    
    // If there is no source we shouldn't do anything.
    if (source == null) return;
    
    // Find the actual index to be selected (if outside the boundaries of the collection)
    // and find the actual element to be selected.
    var convertedSource = source.Cast<object>();
    var currentIndex = GetCurrentSelectedIndex(element);
    var elementToSelect = convertedSource.ElementAtOrDefault(currentIndex);
    
                ICommand updateValue = null;
                if (contentControl != null)
                {
                    updateValue = contentControl.GetValue(IndexChangedProperty) as ICommand;
                }
    
                if (updateValue != null)
                    if (updateValue.CanExecute(elementToSelect))
                    {
                        updateValue.Execute(elementToSelect);
                        
    
                    }
    
    
    // Update the cotnent of the ContentControl if attached to a ContentControl.
    if (contentControl != null)
    {
    contentControl.Content = elementToSelect;
                    
    }
    }
 
 
John
Top achievements
Rank 1
 asked on 03 Feb 2012
1 answer
229 views
We have approx 1000 rows in a RadGridView (version 2011.2.808.40) with grouping on one column resulting in 5 groups.

I have noticed that when scrolling down using the arrow key that when you scroll past a group header (GridViewGroupRow) the grid will auto scroll the group header to the top of the view port before continuing to scroll as normal. This produces a jump in the display, especially as the group header is initially out of sight (just beyond the bottom of the view port).

Is there any way to turn this behavior off, so that a group header scrolls into view and then up the page like any other row?

Thanks!
Vera
Telerik team
 answered on 03 Feb 2012
1 answer
143 views
I have saved files from a data base then used the paths to bind them to my images in my book. But now I need to release those images and rebind with different images. I am not able to delete out the image files that I created to display from the first book that was created. How do I clear the locks on the files so I can recreate them from other images in the database?

 

 

 

 

private void Process_Tiff(BookView wpfbook, string TempFile)
{
    RemoveOldFiles();
    //Sets each page to an image
    Image img = Image.FromFile(TempFile);
    int count = img.GetFrameCount(FrameDimension.Page);
    List<BookItem> MyBook = new List<BookItem>();
    for (int idx = 0; idx < count; idx++)
    {
        img.SelectActiveFrame(FrameDimension.Page, idx);
        int currentpage = idx + 1;
        string TempPageFile = DefaultPath + DocOcc.ToString() + currentpage.ToString() + ".TIFF";
        // and then create a new Image from it
        img.Save(TempPageFile);
        dFile df = new dFile();
        df.File_Path = TempPageFile;
        FileList.Add(df);
        MyBook.Add(new BookItem()
        {
            Title = TempPageFile
        });
    }
    img.Dispose();
    wpfbook.RadBook1.ItemsSource = MyBook;
}

This is the code where I create a file for each page of my Tiff file. Then I use this code to try and remove it. But I am not able to remove the file.

private void RemoveOldFiles()
{
    ((BookView)((ElementHost)panel1.Controls[0]).Child).RadBook1.ItemsSource = null;
    int count = 0;
    IList<dFile> holddf = new List<dFile>();
    foreach (dFile dfrow in FileList)
   {
       try
       {
           File.Delete(dfrow.File_Path);
           count++;
       }
       catch
       {
           dFile df = new dFile();
           df.File_Path = dfrow.File_Path;
           holddf.Add(df);
           count++;
       }
   }
    FileList = holddf;
}

The result is always faling in to the Catch and the error is always that the file is in use. Hopefully this helps someone help me.

Petar Mladenov
Telerik team
 answered on 03 Feb 2012
5 answers
239 views
I have a wpf window with a search button and some fields to enter the search criteria. Some of the search fields are RadDatePicker controls which are bound to a custom object. Wpf does not update the custom object with changes until the field loses focus. When the search button is clicked, my code checks if each field has the focus. If it does, it calls UpdateSource() on the BindingExpression to make sure the custom object has the current values.

This is not working with RadDatePicker. I call UpdateSource() and it does not update the value in my custom object. I am binding to the SelectedDate property. Everything works fine when I tab out of the RadDatePicker control before clicking the search button.

Is there a way tell RadDatePicker to update the source without moving the focus?

The IsFocused property on RadDatePicker never seems to be true so that might be a bug.

Konstantina
Telerik team
 answered on 03 Feb 2012
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?