Telerik Forums
UI for WPF Forum
1 answer
73 views
My application can open items in either the document host of a RadDocking control, or open them into a new window (not a docking floating window).

When the item is opened and put into the Docking control, the CPU Usage of the program constantly busy, anywhere from 2-7 % (relative per machine of course) As soon as i close my item, the CPU goes back down to 0 and never moves.

If I open the item into a new window, the CPU usage does not move as the program sits, like it does when it is docked in the docking control.

Any idea why I might have this Issue?
George
Telerik team
 answered on 28 Nov 2011
1 answer
62 views
Hi,
I'm trying to make a visibility of an item depends on its property.
Searcing the forum gave me several similar questions but I could not find the answer.
I hope someone take a look at this problem.
Many thanks.


Chris
Top achievements
Rank 1
 answered on 28 Nov 2011
1 answer
110 views
I'm interested in replaying a control's default animations when it's visibility changes to Visible.  If it matters, I'm particularly interested in RadChart and RadTileView animations.  Are there examples that accomplish this?

Thanks,
Kevin
Yana
Telerik team
 answered on 28 Nov 2011
1 answer
104 views
When a chart is first populated with data, the series are drawn with animation.

I would like to repeat this animation when the chart comes back into focus (e.g. if the form is minimised, then I would like to show the animation again when the form is maximised).

Does anyone know how to replay the animation?

Thanks.
Sia
Telerik team
 answered on 28 Nov 2011
1 answer
168 views
Hi,

I'm using trial version of Telerik WPF controls (Q3 2011) and trying to create my own theme for ScheduleView using following article as a guide Creating a Custom Theme Project (I know it is written for Silverlight control but I can't find something similar for WPF)
I used SchedulerView.xaml from OfficeBlue theme as a starting point for my modification. And it looks like I almost successfully applied my custom theme to the RadScheduleView controls. My problem is that some "parts" of the control are missing in the custom theme, you can see it on the screenshot attached bellow.
It is obvious I'm doing something wrong but I can't figure out what is exactly wrong, so could you please help me with it.

Here is the link to my demo project http://dl.dropbox.com/u/3950376/TelerikScheduleView.zip (I don't know how to attach zip files to my message here)

Thanks,
Alexander
Dani
Telerik team
 answered on 28 Nov 2011
1 answer
94 views

I have two sources for dragging and dropping appointments onto the ScheduleView. Both consist of dragging custom appt objects so they both utilize a custom dragdrop handler class and use the override of the ConvertDraggedData method. I am wondering if it would be possible to arrange the appts in such a way that if I grabbed appts from all over the view and then dragged them to a specific resource at a specific time, If I could then just have them updated in such a way that the appts were dropped one after another in the view (stacked horizontally in timeline view for example). I think the issue I am having is that destination slots need to be updated somehow to reflect where I want the appts to eventually be. Hopefully this isn't too confusing and someone can lead me in the right direction. Here is a bit of code that I wrote but obviously it isn't working like I expect at this point. I am basically trying to re-arrange the appts so that one comes right after another when they are dropped. The collection looks like I expect when it comes out of my ArrageTasks, but the result is the appts still end up in slots all over the view.

public override IEnumerable<IOccurrence> ConvertDraggedData(object data)
        {
            if (data.GetType() == typeof(DataObject))
            {
                return ArrangeTasks(data);
                //return (data as DataObject).GetData("MetrixTaskAppointments") as IList<IOccurrence>;
            }
 
            return base.ConvertDraggedData(data);
        }
 
        private IEnumerable<IOccurrence> ArrangeTasks(object data)
        {
            IList<IOccurrence> appts = (data as DataObject).GetData("MetrixTaskAppointments") as IList<IOccurrence>;
            IEnumerable<IOccurrence> sortedAppts = appts.OrderBy(f => f.Start);
 
            IEnumerator apptEnumerator = sortedAppts.GetEnumerator();
            DateTime savedPlanTravelEndDttm = DateTime.Now;
            bool firstTask = true;
            while (apptEnumerator.MoveNext())
            {
                MetrixTaskAppointment mAppt = (MetrixTaskAppointment)apptEnumerator.Current;
                IAppointment appt = (Appointment)apptEnumerator.Current;
 
                if (firstTask == true)
                {
                    firstTask = false;
                }
                else
                {                   
                    mAppt.PlanTravelStartDttm = savedPlanTravelEndDttm;
                    mAppt.PlanStartDttm = mAppt.PlanTravelStartDttm.AddMinutes(mAppt.PlanTravelToMin);
                    mAppt.PlanEndDttm = mAppt.PlanStartDttm.AddMinutes(mAppt.PlanTaskDurMin);
                    mAppt.PlanTravelEndDttm = mAppt.PlanEndDttm.AddMinutes(mAppt.PlanTravelReturnMin);
                    appt.Start = mAppt.PlanStartDttm;
                    appt.End = mAppt.PlanEndDttm;
                }
                 
                savedPlanTravelEndDttm = mAppt.PlanTravelEndDttm;
            }
 
            return sortedAppts;
  
        }

Yana
Telerik team
 answered on 28 Nov 2011
3 answers
73 views
If I created a CustomControl derived from a RadComboBox, I have to explicitly load my xaml file in the App.xaml of the final application.

Apparently, the native style of Telerik to replace my style. That is why I have to recharge it back.
Pana
Telerik team
 answered on 28 Nov 2011
4 answers
139 views
Hi all!

I have successfully implemented custom themes (telerik approach) for 2011 Q2 version
of gauges in VS 2010. I was using "Creating and applying a custom theme for RadScheduler for WPF" as help.

Yesterday I installed 2011 Q3 RAD controls and tried to implement new gauges and they are looking
beautiful and are working fine. I also created another custom theme project for new gauges, but I'm
having problems with resources files :( I used templates from Telerik theme samples.
I tried different approaches defining Resources in custom themes library. But I was either getting error
"invalid ThemeType" or "Cannot locate resource 'themes/gauge/customdarkq3/styles.xaml'".

Has procedure for custom themes changed for Q3 version of controls? I noticed there are now 2
gauges xaml files (Gauge.xaml and Gauge_New.xaml). Any suggestion on how to approach this problem?

Regards, Max

Max
Top achievements
Rank 1
 answered on 28 Nov 2011
1 answer
77 views
hello

I have a line graph in WPF and I want to do is just leave the points as you can get an example in the picture.

thanks
Evgenia
Telerik team
 answered on 28 Nov 2011
3 answers
562 views
I'm using RadMap in an MVVM pattern, so I'm not able to get a reference to the map or the InformationLayer so that I can get the best possible LocationRect based on information in the view as mentioned in the first response in this thead:

http://www.telerik.com/community/forums/wpf/map/how-to-get-best-possible-map-view-when-considering-all-poi-s.aspx

I attempted to use the second approach (the method posted at the end of the post), but it too is giving me some problems. I'm able to get a LocationRect, but I'm not able to call the SetView method to center/zoom the map appropriately.

I created properties in my view model for center and zoom. The MapCenter property seems to be working fine, but I'm having a hard time with the zoom property.

List<Telerik.Windows.Controls.Map.Location> locations = this.MyPushpins.Select(pin => pin.Location).ToList();
LocationRect rect = this.GetBestView(locations, new Size(0.01, 0.01));
 
MapCenter = rect.Center;
MapZoomLevel = rect.ZoomLevel;

The problem is the LocationRect.ZoomLevel property isn't set and I don't know how to set it without having more information from the map, itself.

For reference, here is the method posted in the original thread:

public LocationRect GetBestView(IEnumerable<PointOfInterest> itemsList, Size defaultSize)
{
    LocationRect bestView = new LocationRect();
    Location northEast = Location.Empty;
    Location southWest = Location.Empty;
   
    foreach (PointOfInterest item in itemsList)
    {
        Location location = item.Location;
   
        if (northEast.IsEmpty)
        {
            northEast = location;
        }
        else
        {
            if (!location.IsEmpty)
            {
                northEast.Latitude = Math.Max(northEast.Latitude, location.Latitude);
                northEast.Longitude = Math.Max(northEast.Longitude, location.Longitude);
            }
        }
   
        if (southWest.IsEmpty)
        {
            southWest = location;
        }
        else
        {
            if (!location.IsEmpty)
            {
                southWest.Latitude = Math.Min(southWest.Latitude, location.Latitude);
                southWest.Longitude = Math.Min(southWest.Longitude, location.Longitude);
            }
        }
    }
   
    if (!northEast.IsEmpty && !southWest.IsEmpty)
    {
        bestView = new LocationRect(northEast, southWest);
   
        if (bestView.IsEmpty)
        {
            bestView = new LocationRect(
                new Location(bestView.North + defaultSize.Height / 2.0, bestView.West - defaultSize.Width / 2.0),
                new Location(bestView.North - defaultSize.Height / 2.0, bestView.West + defaultSize.Width / 2.0));
        }
    }
   
    return bestView;
}
Andrey
Telerik team
 answered on 28 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?