Greetings,
Currently I am in process of developing an application for booking (etc. rooms). The most painful thing in front of me: "The booking chart". It should looks similarly to the following thing:
http://img195.imageshack.us/img195/4807/99573694.gif
Any suggestion how can I build the "skeleton" of the booking chart? should i use grid etc? I would like to navigate through the days and additionally passed number of items and current datetime range
Looking at your example it looks like a job for DataGrid (http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117 if you're on WPF 3.5, it's part of WPF 4).
I would implement the navigation functionality by using LINQ to filter your data set to the range you're interested in. The navigation controls would have to be provided by you separate from the DataGrid.
Hope that helps...
This looks similar to the Scheduling tool Billy Hollis shows in dnr tv number 115 which is a listbox on its side.
http://www.dnrtv.com/default.aspx?showNum=115
Mike
Related
I have a requirement for a 4.2.1 ExtJS app that Im building, to have a grid like the image below:
The objective of the grid is to manage Holidays for employees.
I was thinking in setting the columns of the grid dinamically, but will need to fill the background cell depending of the type of "leave type", and also disable some cells depending on the days that are not supposed to work (like weekends, etc).
Any advice on how can I approach to the solution? Appreciate in advance.
There is a commercial scheduler that does exactly that and more. See http://bryntum.com
I am trying to add images to a listbox with a "continuous scroll" so the user does not have to press any buttons etc to load the next set of images. The images are stored in Isolated Storage. I will be starting with 500 images. Loading 500 images to a listbox obviously does not work and just eats up all resources in a few seconds. Based on my research I need to use data virtualization so the images are retreived when they are required (on-screen) and disposed of when not-required (of-screen), as opposed to loading them all at once. I have searched the web for examples but have only been able to find code which retreives and displays text etc to populate the listbox as oposed to images stored in IS. I "belive" I need to use an Image within a Data Template, within a listbox and then bind to an IList using a custom class. I can bind the list box to a basic IList and that works ok (only 50 images) but when it comes to creating a custom class etc its over my head. Does anyone have an example of what I need that they would be happy to share? I havent been programming a year yet and have found most of my App requirements to be achievable with a litte research but I cant find any good pages or video that explains this exact requirement and its driving me crazy as I have spent days on it.
Failing that I will have to pay Telerik for their support and use their DataBoundListBox or pay a third party to write it for me, but I thought I would try here before parting with hundreds of dollars!
Thanks for your time(s) in advance!
Here is a proper implementation of data virtualization: http://blogs.msdn.com/b/ptorr/archive/2010/08/16/virtualizing-data-in-windows-phone-7-silverlight-applications.aspx
This is how you bind images to the image control: Image UriSource and Data Binding
To get data Data Virtualization on the Windows Phone 7 you can use the VirtualizingStackPanel class. In the MSDN you can find all the properties you may want to set. To use the control you put your list inside this control:
<VirtualizingStackPanel>
<YOUR LIST>
</VirtualizingStackPanel>
Since you would like to have a tutorial I can point you to Jevgeni TÅ¡aikin blog post on ItemsControl virtualization. If you want more check out the post from Shawn Oster on Improving ListBox Performance.
I am just trying to wrap my head around MEF.
And as I am really going to love it ( I guess ) I started my first sample project and immediatly stumbled into a big problem and now I am asking myself if I can use MEF for my scenario at all and that is the following:
Imagine that one got some kind of dashboard with, let's say, five regions and above each region there are two comboboxes. The values in the first combobox represent different possible views (for example, chartControl, tableControl, pictureControl, ...) and the values of the second combobox represents the different data sources for the currently selected control.
As the controls are very big in size one wants to download them as needed.
If the user selects one comboboxitem the corresponding control xap should be loaded and displayed in this specific region. If the user selectes another control in the same combobox the control should be removed from the visualtree and the next control should be downloaded and displayed. If the user changes the selection in a different combobox the corresponding control should be loaded again only in this specific region, with perhaps different data.
And to make it a little more interesting - as this is some kind of dashboard one can change the layout from five regions to - for example - ten regions.
I've seen the video "MVVM with MEF in Silverlight Video Tutorial Part 2: Plugins and Metadata" ( http://csharperimage.jeremylikness.com/2010/03/mvvm-with-mef-in-silverlight-video_09.html ) but he is using an ItemsControl and is working with Visibility and he only got ONE region. So I think that this technique is not working for me...
Puh, I hope I could make myself clear!
Thanks a lot for any piece of information!!!
Greetings,
Tim.
Glenn Block has a series about using MEF to write a Silverlight Dashboard: http://codebetter.com/blogs/glenn.block/archive/2009/11/30/building-the-hello-mef-dashboard-in-silverlight-4-part-i.aspx
From this article http://msdn.microsoft.com/en-us/magazine/dd882520.aspx I wanted to create a list of selected days like he did. Except my list is not static and putting it in the converter seems smelly. Has anyone done something similar with the WPF toolkit calendar control? Or are we trying to use this control for something more than what it is intended?
Use a MultiValueConverter which takes a DateTime and a list of special days.
I'm getting some very strange date formatting issues in my Silverlight application. My local culture is set to UK, yet I am consistently seeing US dates popping up all over the place. I can easily hardcode these to UK format in specific loactions using:
<UserControl ... Language="en-GB"...>
But as I'm sure you'd all agree this is a terrible thing to do.
I have tried setting the Lanaguage to en-GB in the main application and this has partial success. I have also tried Justin Angels suggestion (posted here: How to change date format in Silverlight DatePicker control?), again only partial success.
An example of the issue can be seen here:
http://lh3.ggpht.com/%5FL9TmtwXFtew/Sw5aVZJfG1I/AAAAAAAAGkI/6jYnsB91HjI/image%5Fthumb%5B1%5D.png http://lh3.ggpht.com/%5FL9TmtwXFtew/Sw5aVZJfG1I/AAAAAAAAGkI/6jYnsB91HjI/image%5Fthumb%5B1%5D.png
The datagrid on the parent page shows UK formatting, whilst the information in the ChildWindow shows US formatting ...grrrr
Anyone have a definitive solution for solving this across a whole application?
Thanks,
Mark
You can data bind Language property of the root visual element. Take a look at my question here:
How to switch UI Culture of data binding on the fly in Silverlight
Can you not use the SelectedDateFormat property of the datepicker? If you want to do this once could you not create your own usercontrol that derives from the original with this value preset, then use your derived control throughout your app?
Kindness,
Dan
Shot in the dark, but does changing the browser's Language Preference make a differnence? I.e. in IE Tools-->Internet Options-->Languages.
HTH
Mark
You can set the date format for your entire application in the application start up event as follows.This will override any regional settings on the users machine
Thread.CurrentThread.CurrentCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = dd/MM/yyyy";