European Silverlight 4 & Silverlight 5 Hosting BLOG

BLOG about Silverlight 5 Hosting and Its Techologies - Dedicated to European Windows Hosting Customer

European Silverlight 6 Hosting - HostForLIFE.eu :: Update Data Using Silverlight RIA Enabled ServiceToday

clock July 10, 2018 11:28 by author Peter

Update Data Using Silverlight RIA Enabled ServiceToday, in this article let's play around with one of the interesting and most useful concepts in Silverlight.

Question: What is update data using Silverlight RIA enabled service?
In simple terms "This application enables to update the data in the database with help of Silverlight RIA enabled service. It uses base platform of entity framework to communicate with database".

Step 1: Create a database named "Company" with employee table in it.

Step 2: Open up Visual Studio and create a new Silverlight application enabled with RIA Services
Step 3: When the project is created. Right-click on RIA Service project and add new entity data model framework and set it up for previously created database.
Step 4: Again right click on RIA service project and add Domain Service Class as new item.
Step 5: Complete code of EmployeeDomain.cs looks like this (Domain Service Class)
namespace SilverlightRIAInsert.Web
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Linq;
using System.ServiceModel.DomainServices.EntityFramework;
using System.ServiceModel.DomainServices.Hosting;
using System.ServiceModel.DomainServices.Server;
// Implements application logic using the CompanyEntities context.
// TODO: Add your application logic to these methods or in additional methods.
// TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
// Also consider adding roles to restrict access as appropriate.
// [RequiresAuthentication][EnableClientAccess()]
public class EmployeeDomain : LinqToEntitiesDomainService<CompanyEntities>
{
    // TODO:// Consider constraining the results of your query method.  If you need additional input you can
    // add parameters to this method or create additional query methods with different names.
    // To support paging you will need to add ordering to the 'Employee'
    query.public IQueryable<Employee> GetEmployee()
    {
        return this.ObjectContext.Employee;
    }
    public void InsertEmployee(Employee employee)
    {
        if ((employee.EntityState != EntityState.Detached))
        {
            this.ObjectContext.ObjectStateManager.ChangeObjectState(employee, EntityState.Added);
        }
        else{this.ObjectContext.Employee.AddObject(employee);
        }
    }
    public void UpdateEmployee(Employee currentEmployee)
    {
        this.ObjectContext.Employee.AttachAsModified(currentEmployee, this.ChangeSet.GetOriginal(currentEmployee));
    }
    public void DeleteEmployee(Employee employee)
    {
        if ((employee.EntityState != EntityState.Detached))
        {
            this.ObjectContext.ObjectStateManager.ChangeObjectState(employee, EntityState.Deleted);
        }
        else{this.ObjectContext.Employee.Attach(employee);
           this.ObjectContext.Employee.DeleteObject(employee);
        }
    }
}
}


Step 6: Now rebuild the solution file.
Step 7: The complete code of MainPage.xaml looks like this:
<usercontrolx:class="SilverlightRIAInsert.MainPage"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"mc:ignorable="d"
d:designheight="300"d:designwidth="543">
<Gridx:Name="LayoutRoot"Width="608">
<TextBlockHeight="23"HorizontalAlignment="Left"Margin="152,29,0,0"Name="textBlock1"Text="Id"FontFamily="Verdana"FontSize="15"VerticalAlignment="Top"/>
<TextBoxHeight="23"HorizontalAlignment="Left"Margin="252,25,0,0"Name="textBox1"VerticalAlignment="Top"Width="120"/>
<TextBlockHeight="23"HorizontalAlignment="Left"Margin="150,72,0,0"Name="textBlock2"Text="FirstName"FontFamily="Verdana"FontSize="15"VerticalAlignment="Top"/>
<TextBoxHeight="23"HorizontalAlignment="Left"Margin="252,68,0,0"Name="textBox2"VerticalAlignment="Top"Width="120"/>
<TextBlockHeight="23"HorizontalAlignment="Left"Margin="150,113,0,0"Name="textBlock3"Text="LastName"FontFamily="Verdana"FontSize="15"VerticalAlignment="Top"/>
<TextBoxHeight="23"HorizontalAlignment="Left"Margin="252,113,0,0"Name="textBox3"VerticalAlignment="Top"Width="120"/>
<ButtonContent="Update"FontFamily="Verdana"FontSize="19"Background="DeepSkyBlue"Height="44"HorizontalAlignment="Left"Margin="252,206,0,0"Name="button1"VerticalAlignment="Top"Width="120"Click="button1_Click"/>
<TextBoxHeight="23"HorizontalAlignment="Left"Margin="252,155,0,0"Name="textBox4"VerticalAlignment="Top"Width="120"/>
<TextBlockHeight="23"HorizontalAlignment="Left"Margin="152,155,0,0"Name="textBlock4"Text="Age"FontFamily="Verdana"FontSize="16"VerticalAlignment="Top"/>
</Grid>"
</usercontrol>


Step 8: The complete code of MainPage.xaml.cs looks like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.ServiceModel.DomainServices.Client;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using SilverlightRIAUpdate.Web;
namespace SilverlightRIAUpdate
{
public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
    }
    EmployeeDomain objDomain = new EmployeeDomain();
    private void button1_Click(object sender, RoutedEventArgs e)
    {
        EntityQuery<Employee> query = objDomain.GetEmployeeQuery();
        objDomain.Load(query, UpdateLoad, null);
        MessageBox.Show("Data Updated Successfully");
    }
    public void UpdateLoad(LoadOperation<Employee> emp)
    {
        foreach (Employee e in objDomain.Employees)
        {
            if (e.Id == int.Parse(textBox1.Text))
           {
                e.FirstName = textBox2.Text;
                e.LastName = textBox3.Text;
                e.Age = int.Parse(textBox4.Text);
                objDomain.SubmitChanges();
                break;
            }
        }
    }
}
}

 



HostForLIFE.eu Proudly Launches Umbraco 7.5.7 Hosting

clock January 27, 2017 07:55 by author Peter

HostForLIFE.eu, a leading Windows web hosting provider with innovative technology solutions and a dedicated professional services team, today announced the support for Umbraco 7.5.7 hosting plan due to high demand of Umbraco users in Europe. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

 

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam, (NL), London, (UK), Washington, D.C. (US), Paris, (France), Frankfurt, (Germany), Chennai, (India), Milan, (Italy), Toronto, (Canada) and São Paulo, (Brazil) to guarantee 99.9% network uptime. All data centers feature redundancies in network connectivity, power, HVAC, security and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. HostForLIFE Umbraco hosting plan starts from just as low as €3.49/month only and this plan has supported ASP.NET Core 1.1, ASP.NET MVC 5/6 and SQL Server 2012/2014/2016.

Umbraco is a fully-featured open source content management system with the flexibility to run anything from small campaign or brochure sites right through to complex applications for Fortune 500's and some of the largest media sites in the world. Umbraco is strongly supported by both an active and welcoming community of users around the world, and backed up by a rock-solid commercial organization providing professional support and tools. Umbraco can be used in its free, open-source format with the additional option of professional tools and support if required.

Umbraco release that exemplifies our mission to continue to make Umbraco a bit simpler every day. The other change is that there's now a "ValidatingRequest" event you can hook into. This event allows you to "massage" any of the requests to ImageProcessor to your own liking. So if you'd want to never allow any requests to change BackgroundColor, you can cancel that from the event. Similarly if you have a predefined set of crops that are allowed, you could make sure that no other crop sizes will be processed than those ones you have defined ahead of time.

Further information and the full range of features Umbraco 7.5.7 Hosting can be viewed here: http://hostforlife.eu/European-Umbraco-757-Hosting



HostForLIFE.eu Proudly Launches Visual Studio 2017 Hosting

clock December 2, 2016 07:20 by author Peter

European leading web hosting provider, HostForLIFE.eu announces the launch of Visual Studio 2017 Hosting

HostForLIFE.eu was established to cater to an underserved market in the hosting industry; web hosting for customers who want excellent service. HostForLIFE.eu - a cheap, constant uptime, excellent customer service, quality, and also reliable hosting provider in advanced Windows and ASP.NET technology. HostForLIFE.eu proudly announces the availability of the Visual Studio 2017 hosting in their entire servers environment.

The smallest install is just a few hundred megabytes, yet still contains basic code editing support for more than twenty languages along with source code control. Most users will want to install more, and so customer can add one or more 'workloads' that represent common frameworks, languages and platforms - covering everything from .NET desktop development to data science with R, Python and F#.

System administrators can now create an offline layout of Visual Studio that contains all of the content needed to install the product without requiring Internet access. To do so, run the bootstrapper executable associated with the product customer want to make available offline using the --layout [path] switch (e.g. vs_enterprise.exe --layout c:\mylayout). This will download the packages required to install offline. Optionally, customer can specify a locale code for the product languages customer want included (e.g. --lang en-us). If not specified, support for all localized languages will be downloaded.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt(DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customers can start hosting their Visual Studio 2017 site on their environment from as just low €3.00/month only.

HostForLIFE.eu is a popular online ASP.NET based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu offers the latest European Visual Studio 2017 hosting installation to all their new and existing customers. The customers can simply deploy their Visual Studio 2017 website via their world-class Control Panel or conventional FTP tool. HostForLIFE.eu is happy to be offering the most up to date Microsoft services and always had a great appreciation for the products that Microsoft offers.

Further information and the full range of features Visual Studio 2017 Hosting can be viewed here http://hostforlife.eu/European-Visual-Studio-2017-Hosting

About Company
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. HostForLIFE.eu deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft. Their service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, they have also won several awards from reputable organizations in the hosting industry and the detail can be found on their official website.



HostForLIFE.eu Proudly Launches ASP.NET Core 1.0 RC2 Hosting

clock June 4, 2016 01:06 by author Peter

HostForLIFE.eu was established to cater to an underserved market in the hosting industry; web hosting for customers who want excellent service. HostForLIFE.eu - a cheap, constant uptime, excellent customer service, quality, and also reliable hosting provider in advanced Windows and ASP.NET technology. HostForLIFE.eu proudly announces the availability of the ASP.NET Core 1.0 RC2 hosting in their entire servers environment.

ASP.NET is Microsoft's dynamic website technology, enabling developers to create data-driven websites using the .NET platform and the latest version is 5 with lots of awesome features. ASP.NET Core 1.0 RC2 is a lean .NET stack for building modern web apps. Microsoft built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead.

A key change that occurred between RC1 and RC2 is the introduction of the .NET command-line interface.  This tool replaces the dnvm, dnx, and dnu utilities with a single tool that handles the responsibilities of these tools. In RC1 an ASP.NET application was a class library that contained a Startup.cs class. When the DNX toolchain run your application ASP.NET hosting libraries would find and execute the Startup.cs, booting your web application. Whilst the spirit of this way of running an ASP.NET Core application still exists in RC2, it is somewhat different. As of RC2 an ASP.NET Core application is a .NET Core Console application that calls into ASP.NET specific libraries. What this means for ASP.NET Core apps is that the code that used to live in the ASP.NET Hosting libraries and automatically run your startup.cs now lives inside a Program.cs.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt(DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customers can start hosting their ASP.NET Core 1.0 RC2 site on their environment from as just low €3.00/month only.

HostForLIFE.eu is a popular online ASP.NET based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu offers the latest European ASP.NET Core 1.0 RC2 hosting installation to all their new and existing customers. The customers can simply deploy their ASP.NET Core 1.0 RC2 website via their world-class Control Panel or conventional FTP tool. HostForLIFE.eu is happy to be offering the most up to date Microsoft services and always had a great appreciation for the products that Microsoft offers.

Further information and the full range of features ASP.NET Core 1.0 RC2 Hosting can be viewed here http://hostforlife.eu



HostForLIFE.eu Proudly Launches ASP.NET 4.6 Hosting

clock September 7, 2015 12:36 by author Peter

HostForLIFE.eu was established to cater to an underserved market in the hosting industry; web hosting for customers who want excellent service. HostForLIFE.eu – a cheap, constant uptime, excellent customer service, quality, and also reliable hosting provider in advanced Windows and ASP.NET technology. HostForLIFE.eu proudly announces the availability of the ASP.NET 4.6 hosting in their entire servers environment.

http://hostforlife.eu/img/logo_aspnet1.png

ASP.NET is Microsoft's dynamic website technology, enabling developers to create data-driven websites using the .NET platform and the latest version is 5 with lots of awesome features. ASP.NET 4.6 is a lean .NET stack for building modern web apps. Microsoft built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead.

According to Microsoft officials, With the .NET Framework 4.6, you'll enjoy better performance with the new 64-bit "RyuJIT" JIT and high DPI support for WPF and Windows Forms. ASP.NET provides HTTP/2 support when running on Windows 10 and has more async task-returning APIs. There are also major updates in Visual Studio 2015 for .NET developers, many of which are built on top of the new Roslyn compiler framework. The .NET languages -- C# 6, F# 4, VB 14 -- have been updated, too.There are many great features in the .NET Framework 4.6. Some of these features, like RyuJIT and the latest GC updates, can provide improvements by just installing the .NET Framework 4.6.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt(DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customers can start hosting their ASP.NET 4.6 site on their environment from as just low €3.00/month only.

HostForLIFE.eu is a popular online ASP.NET based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu offers the latest European ASP.NET 4.6 hosting installation to all their new and existing customers. The customers can simply deploy their ASP.NET 4.6 website via their world-class Control Panel or conventional FTP tool. HostForLIFE.eu is happy to be offering the most up to date Microsoft services and always had a great appreciation for the products that Microsoft offers.

Further information and the full range of features ASP.NET 4.6 Hosting can be viewed here http://hostforlife.eu/European-ASPNET-46-Hosting



HostForLIFE.eu Launches Umbraco 7.2.8 Hosting

clock August 19, 2015 07:00 by author Peter

HostForLIFE.eu, a leading web hosting provider, has leveraged its gold partner status with Microsoft to launch its latest Umbraco 7.2.8 Hosting support

HostForLIFE.eu, a leading Windows web hosting provider with innovative technology solutions and a dedicated professional services team, today announced the support for Umbraco 7.2.8 hosting plan due to high demand of Umbraco users in Europe. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt (DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. HostForLIFE Umbraco hosting plan starts from just as low as €3.00/month only and this plan has supported ASP.NET 4.5, ASP.NET MVC 5/6 and SQL Server 2012/2014.

Umbraco 7.2.8 is a fully-featured open source content management system with the flexibility to run anything from small campaign or brochure sites right through to complex applications for Fortune 500's and some of the largest media sites in the world. Umbraco was sometimes unable to read the umbraco.config file, making Umbraco think it had no content and showing a blank page instead (issue U4-6802), this is the main issue fixed in this release. This affects people on 7.2.5 and 7.2.6 only. 7.2.8 also fixes a conflict with Courier and some other packages.

Umbraco 7.2.8 Hosting is strongly supported by both an active and welcoming community of users around the world, and backed up by a rock-solid commercial organization providing professional support and tools. Umbraco 7.2.8 can be used in its free, open-source format with the additional option of professional tools and support if required. Not only can you publish great multilingual websites using Umbraco 7.2.8 out of the box, you can also build in your chosen language with our multilingual back office tools.

Further information and the full range of features Umbraco 7.2.8 Hosting can be viewed here: http://hostforlife.eu/European-Umbraco-728-Hosting



HostForLIFE.eu Launches nopCommerce 3.60 Hosting

clock July 14, 2015 10:57 by author Peter

HostForLIFE.eu, a leading web hosting provider, has leveraged its gold partner status with Microsoft to launch its latest NopCommerce 3.60 Hosting support

European Recommended Windows and ASP.NET Spotlight Hosting Partner, HostForLIFE.eu, has announced the availability of new hosting plans that are optimized for the latest update of the NopCommerce 3.60 hosting technology.

HostForLIFE.eu supports NopCommerce 3.60 hosting on their latest Windows Server and this service is available to all their new and existing customers. nopCommerce 3.60 is a fully customizable shopping cart. It's stable and highly usable. nopCommerce is an open source ecommerce solution that is ASP.NET (MVC) based with a MS SQL 2008 (or higher) backend database. Their easy-to-use shopping cart solution is uniquely suited for merchants that have outgrown existing systems, and may be hosted with your current web hosting. It has everything you need to get started in selling physical and digital goods over the internet.

HostForLIFE.eu Launches nopCommerce 3.60 Hosting

nopCommerce 3.60 is a fully customizable shopping cart. nopCommerce 3.60 provides new clean default theme. The theme features a clean, modern look and a great responsive design. The HTML have been refactored, which will make the theme easier to work with and customize , predefined (default) product attribute values. They are helpful for a store owner when creating new products. So when you add the attribute to a product, you don't have to create the same values again , Base price (PAngV) support added. Required for German/Austrian/Swiss users, “Applied to manufacturers” discount type and Security and performance enhancements.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam, London, Paris, Seattle (US) and Frankfurt (Germany) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee.

All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customer can start hosting their NopCommerce 3.60 site on their environment from as just low €3.00/month only. HostForLIFE.eu is a popular online Windows based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market. Their powerful servers are specially optimized and ensure NopCommerce 3.60 performance.

For more information about this new product, please visit http://hostforlife.eu/European-nopCommerce-36-Hosting



HostForLIFE.eu Proudly Launches Drupal 7.37 Hosting

clock June 1, 2015 09:41 by author Peter

European Windows and ASP.NET Spotlight Hosting Partner in Europe, HostForLIFE.eu, has announced the availability of new hosting plans that are optimized for the latest update of the Drupal 7.37 hosting technology.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt(DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security, and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. The customers can start hosting our Drupal site on our environment from as just low €3.00/month only.

Drupal is an open source content management platform powering millions of websites and applications. Thousands of add-on modules and designs let you build any site you can imagine. Drupal 7.37 Includes bug fixes and small API/feature improvements only (no major new functionality); major, non-backwards-compatible new features are only being added to the forthcoming Drupal 8.0 release. If you are looking for the right Windows ASP.NET Hosting provider that support Drupal 7.37, we are the right choice for you.

The 7.37 update also includes fixed a regression in Drupal 7.36 which caused certain kinds of content types to become disabled if we were defined by a no-longer-enabled module, removed a confusing description regarding automatic time zone detection from the user account form (minor UI and data structure change), allowed custom HTML tags with a dash in the name to pass through filter_xss() when specified in the list of allowed tags, allowed hook_field_schema() implementations to specify indexes for fields based on a fixed-length column prefix (rather than the entire column), as was already allowed in hook_schema() implementations, fixed PDO exceptions on PostgreSQL when accessing invalid entity URLs, added a sites/all/libraries folder to the codebase, with instructions for using it and added a description to the "Administer text formats and filters" permission on the Permissions page (string change).

HostForLIFE have hosted large numbers of websites and blogs until now. Our clients come from diverse backgrounds from all sectors of the economy. HostForLIFE.eu clients are specialized in providing supports for Drupal for many years. We are glad to provide support for European Drupal 7.37 hosting users with advices and troubleshooting for our client website when necessary.

HostForLIFE.eu is a popular online Windows based hosting service provider catering to those people who face such issues. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market. Our powerful servers are especially optimized and ensure Drupal 7.37 performance. We have best data centers on three continent, unique account isolation for security, and 24/7 proactive uptime monitoring.

For more information about this new product, please visit http://hostforlife.eu/European-Drupal-737-Hosting

About HostForLIFE.eu
HostForLIFE.eu is an European Windows Hosting Provider which focuses on the Windows Platform only. HostForLIFE.eu deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Our service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, we have also won several awards from reputable organizations in the hosting industry and the detail can be found on our official website.



Silverlight with Free ASP.NET Hosting - HostForLIFE.eu :: How to Create Simple Navigation in Silverlight ?

clock April 21, 2015 08:08 by author Peter

Navigation Framework is absolutely good however in some cases we have a tendency to don't need to use the Navigation Framework. This navigation technique may be used instead that provides simple Navigation. Add the following code in App.xaml:

private static Grid root    
public static void Navigate(UserControl newPage)
{
UserControl oldPage = root.Children[0] as UserControl;
root.Children.Add(newPage);
root.Children.Remove(oldPage);
}

Now, Edit the App.xaml as shown below:
Previous code: 
private void Application_Startup(object sender, StartupEventArgs e)
{
 this.RootVisual = new MainPage();
 }

Modified code:

private void Application_Startup(object sender, StartupEventArgs e)
{
root = new Grid();
root.Children.Add(new MainPage());
this.RootVisual = root;     
}


Create a new usercontrol NewPage . Add Button to the Page inorder to navigate to the home. equally produce a button within the MainPage.xaml as well inorder to navigate to the NewPage. within the Button Click event add the following code:
       App app = (App)Application.Current;
        App.Navigate(new NewPage());


Application.Current gets the System.Windows.Application object for this application. The new instance of the Page is passed to the Navigate method of App class. When we run the code we are able to navigate between the MainPage and also the NewPage.xaml.

 

Silverlight 6 with Free ASP.NET Hosting

Try our Silverlight 6 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc. You will not be charged a cent for trying our service. Once your trial period is complete, you decide whether you'd like to continue.

 



Silverlight 6 with Free ASP.NET Hosting - HostForLIFE.eu :: How to Align Text in DataGrid Cell in Xaml and in Code Behind ?

clock April 14, 2015 07:46 by author Peter

Hi friends, in this short article I will tell you about How to Align Text in DataGrid Cell in Xaml and in Code Behind with Silverlight 6. First, take a look the following code:

DataGridTextColumn textColumn = new DataGridTextColumn();
textColumn.Header = "Result";
textColumn.Binding = new Binding("Result");
dataGrid1.Columns.Add(textColumn);

How I will set RESULT alignment right? Here is what you've got to try to to, I'll show you this in each ways that like doing it in Xaml Page and doing it in code behind. First add the style in your User control Resource:
<UserControl.Resources>
      <Style x:Key="AlignRight" TargetType="Data:DataGridCell">
          <Setter Property="HorizontalContentAlignment" Value="Right" />
     </Style>
</UserControl.Resources>

I'm doing this for Right Align however you'll be able to change it in keeping with your requirement. Next, the way to do this in Xaml Page? Its terribly straightforward, apply this style to whichever column you would like, like this:

<Data:DataGridTextColumn Header="Amount" Width="90" Binding="{Binding Amount}" IsReadOnly="True" CellStyle="{StaticResource AlignRight}"></Data:DataGridTextColumn>

Now how to do this in code behind:
DataGridTextColumn textColumn = new DataGridTextColumn();
textColumn.Header = "Result";
textColumn.Binding = new Binding("Result");
textColumn.CellStyle = Resources["AlignRight"] as Style;
dataGrid1.Columns.Add(textColumn);

Hope it works for you!

Silverlight 6 with Free ASP.NET Hosting

Try our Silverlight 6 with Free ASP.NET Hosting today and your account will be setup soon! You can also take advantage of our Windows & ASP.NET Hosting support with Unlimited Domain, Unlimited Bandwidth, Unlimited Disk Space, etc. You will not be charged a cent for trying our service for the next 3 days. Once your trial period is complete, you decide whether you'd like to continue.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in