Accessing the control from CustomRenderer
In Xamarin Form, you have to know how to use CustomRender. You need to use it to preform some platform specific functions. However, we need to access some properties from CustomRenderer to Xamarin Form Control, such as its height and width, That is very easy to do, you just need to use Element property.
e.g.
Code
int height = Element.Height |
Code Visual Studio (Preview)
Last night, I went to the .Net User Group in Brisbane. The speaker introduced the new product from Microsoft, Code. That is a visual studio style code editor. Well, that is not very impressive at all.
You are not right, that is an very interesting product. It can run in OSX,Linux and WIndows. It provides a tool to work on interface codes outside from Windows. It made my life easier, I can do all js and shtml in OSX and leave only a bit little c# code which I can do in visual studio in windows VM.
Although it is a code editor, it still has some debugging features, it can debug node and mono application.
Lastly, even you only require to use Windows, that is still good to try this. This is without all heavy weighted features from Visual Studio. It load up so quick and less chances to break! That is very cool to use!
Preview Visual Studio 2015
Yesterday, I fired a Virtual Machine with Visual Studio 2015 RC. This is the best way to try out this. Unless you need to download the installation files and install them. I think it requires about an hour, firing a VM is only about 3 minutes.
I tried it for a little while, that is not bad at all. The major improvements are in mobile app development, it has a better integration with xamarin. However, you still need to download xamarin.
Custom ASP.NET Identity MVC 5 - Part 1
I am working a new version of AdvGen CMS. I found the ApplicationUserManager has to use their Entity Framework. I cannot just build our own ApplicationUserManager to switch a different ORM layer. You have to build your own IUserStore like this:
public class AdvGenUserStroe : IUserStore
-->
And then build your own ApplicationUserManager which is using this custom user store.
This is the only way to have a Custom ASP.NET Identity in MVC 5
Refresh Datagrid in WPF
There is no such things for DataGrid.DataBinding() in Datagrid, WPF, the data grid should update itself if any items in the collection is changed. However, I found if the data source is edited by other windows, it won't refresh the data grid.
Well, you can use DataGrid.Items.Refresh(), but sometime, I got an exception about not allow editItem, something like that.
I found the best way is setting the item source to null and set item source to be bounded the collection again, like this:
Code
public void DisplayList(IList< ISchedule> lst) | |
{ | |
lstItems.ItemsSource = null; | |
lstItems.ItemsSource = lst; | |
//lstItems.Items.Refresh(); | |
} |