• Wriju's BLOG

    Office 365 is free for NGO

    • 0 Comments

    It’s a channel and to know more about it visit http://www.microsoft.com/en-us/news/Press/2013/Sep13/09-10Office365NonprofitsPR.aspx

    Microsoft Corp. on Wednesday announced the global availability of Office 365 for Nonprofits for qualifying nonprofits and nongovernmental organizations (NGOs) through its software donation program. The donation is available immediately in 41 countries around the world and for up to 90 countries by July 2014…..

    Namoskar!!!

  • Wriju's BLOG

    Using Repository Pattern in Entity Framework

    • 11 Comments

    One of the most common pattern is followed in the world of Entity Framework is “Repository Pattern”. Since this is something which is heavily used and being practiced, I am not going to talk about the core pattern. Rather, try to show how one can implement it.

    Objectives

    As mentioned in http://msdn.microsoft.com/en-us/library/ff649690.aspx

    • You want to maximize the amount of code that can be tested with automation and to isolate the data layer to support unit testing.
    • You access the data source from many locations and want to apply centrally managed, consistent access rules and logic.
    • You want to implement and centralize a caching strategy for the data source.
    • You want to improve the code's maintainability and readability by separating business logic from data or service access logic.
    • You want to use business entities that are strongly typed so that you can identify problems at compile time instead of at run time.
    • You want to associate a behavior with the related data. For example, you want to calculate fields or enforce complex relationships or business rules between the data elements within an entity.
    • You want to apply a domain model to simplify complex business logic.

    Simple approach to ADO.NET Entity Framework

    Let’s have one domain class called “Employee”

    public class Employee
    
    {
    
        public int Id { get; set; }
    
        public string FullName { get; set; }
    
    }
    Now using this we will have a simple context class
    public class HRContext : DbContext
    
    {        
    
        public DbSet<DomainClasses.Employee> Employees { get; set; }
    
    }
    After that, define the repository interface IEmployeeRepository
    public interface IEmployeeRepository : IDisposable
    
    {
    
        IQueryable<Employee> All { get; }
    
        IQueryable<Employee> AllIncluding(params Expression<Func<Employee, object>>[] includeProperties);
    
        Employee Find(int id);
    
        void InsertOrUpdate(Employee employee);
    
        void Delete(int id);
    
        void Save();
    
    }
    Then the Repository class called EmployeeRepository
    public class EmployeeRepository : IEmployeeRepository
    
    {
    
        HRContext context = new HRContext();
    
        public IQueryable<Employee> All
    
        {
    
            get { return context.Employees; }
    
        }
    
        public IQueryable<Employee> AllIncluding(params Expression<Func<Employee, object>>[] includeProperties)
    
        {
    
            IQueryable<Employee> query = context.Employees;
    
            foreach (var includeProperty in includeProperties) {
    
                query = query.Include(includeProperty);
    
            }
    
            return query;
    
        }
    
        public Employee Find(int id)
    
        {
    
            return context.Employees.Find(id);
    
        }
    
        public void InsertOrUpdate(Employee employee)
    
        {
    
            if (employee.Id == default(int)) {
    
                // New entity
    
                context.Employees.Add(employee);
    
            } else {
    
                // Existing entity
    
                context.Entry(employee).State = EntityState.Modified;
    
            }
    
        }
    
        public void Delete(int id)
    
        {
    
            var employee = context.Employees.Find(id);
    
            context.Employees.Remove(employee);
    
        }
    
        public void Save()
    
        {
    
            context.SaveChanges();
    
        }
    
        public void Dispose() 
    
        {
    
            context.Dispose();
    
        }
    
    }
    Then you should be implementing it in your apps (any type Windows or Web), like a Console Application
    namespace ConsoleApplication
    
    {
    
        class Program
    
        {
    
            static void Main(string[] args)
    
            {
    
                GetSomeEmployee();
    
            }
    
            private static void IntiateData()
    
            {
    
                using (var repo = new EmployeeRepository())
    
                {
    
                    Employee em = new Employee() { FullName = "Wriju" };
    
                    repo.InsertOrUpdate(em);
    
                    repo.Save();
    
                }
    
            }
    
            private static void GetSomeEmployee()
    
            {
    
                using (var repo = new EmployeeRepository()) 
    
                {
    
                    foreach (var emp in repo.All)
    
                    {
    
                        Console.WriteLine("{0} - {1}", emp.Id, emp.FullName);
    
                    }
    
                }            
    
            }
    
        }
    
    }
    This obviously simple approach. The recommended options are to make the Repository generic and handle the related entities. I will discuss about them later.
    Namoskar!!!
  • Wriju's BLOG

    Patterns and Practices : Dependency Injection with Unity–Just Released

    • 1 Comments

    Just Released!!!

    Patterns and Practices guidance on Dependency Injection with Unity

    clip_image001[4] 

     

    PDF

     

    EPUB

     

    MOBI

     

    HARD COPY

     

    Inside the guide:

    Foreword by Chris Tavares

    Chapter 1 – Introduction

    Chapter 2 – Dependency Injection

    Chapter 3 – Dependency Injection with Unity

    Chapter 4 – Interception

    Chapter 5 – Interception using Unity

    Chapter 6 – Extending Unity

    Tales from the Trenches: Using Unity

    Tales from the Trenches: One User's Story – Customizing Unity

    Tales from the Trenches: Using Unity in a Windows Store app

    Appendix  – Unity and Windows Store apps

     

     

     

    The guide is a primer on using dependency injection with Unity – a lightweight extensible dependency injection container built by the Microsoft patterns & practices team. It covers various styles of dependency injection and also additional capabilities of Unity container, such as object lifetime management, interception, and registration by convention. It also discusses the advanced topics of enhancing Unity with your custom extensions.

     

    The guide contains plenty of trade-off discussions and tips and tricks for managing your application cross-cutting concerns and making the most out of both dependency injection and Unity. These are accompanied by a real world example that will help you master the techniques. Keep in mind that Unity can be used in a wide range of application types such as desktop, web, services, and cloud.

     

    We encourage you to experiment with the sample code and think beyond the scenarios discussed in the guide.

    In addition, the guide includes the Tales from the Trenches – a collection of case studies that offer a different perspective through the eyes of developers working on the real world projects and sharing their experiences. These chapters make clear the range of scenarios in which you can use Unity, and also highlight its ease of use and flexibility.

     

    Whether you are a seasoned developer or just starting your development journey, we hope this guide will be worth your time studying it. We hope you discover that Unity container adds significant benefits to your applications and helps you to achieve the goals of maintainability, testability, flexibility, and extensibility in your own projects.

     

    Namoskar!!!
  • Wriju's BLOG

    Microsoft Patterns and Practices Guidance on Solution Development Fundamentals

    • 1 Comments

     

    • Enterprise Library. Enterprise Library is a collection of application blocks that address common cross-cutting concerns that developers face when developing applications. The latest version of Enterprise Library (version 6) was released in April 2013 and includes two new application blocks (Semantic Logging Application Block and Transient Fault Handling Application Block) and many improvements.

    The Enterprise Library 5.0 Integration Pack for Windows Azure is a collection of reusable application blocks that address common cross-cutting concerns in enterprise software development. The Microsoft Enterprise Library Integration Pack for Windows Azure is an extension to Microsoft Enterprise Library 5.0 that can be used with the Windows Azure technology platform. It includes the Autoscaling Application Block, Transient Fault Handling Application Block, blob configuration source, protected configuration provider, and learning materials.

    • Unity. Unity is a lightweight and extensible dependency injection container with support for interception. We recently released Unity 3.0 (also part of the latest version of Enterprise Library) which added a number of key features, including registration by convention and support for Windows Store apps. Unity provides a mature and stable foundation for building high-quality, flexible, pattern-based libraries and reference implementations. It facilitates loosely-coupled design and help improve testability.
    • Parallel Programming with Microsoft .NET This book describes patterns for parallel programming, with code examples, that use the new parallel programming support in the Microsoft® .NET Framework 4. This support is commonly referred to as the Parallel Extensions. You can use the patterns described in this book to improve your application's performance on multicore computers. Adopting the patterns in your code makes your application run faster today and also helps prepare for future hardware environments, which are expected to have an increasingly parallel computing architecture
    • Parallel Programming with Microsoft Visual C++ This book describes patterns for parallel programming, with code examples, that use the parallel programming support in the Microsoft® Visual C++. The Parallel Patterns Library (PPL) and the Asynchronous Agents Library introduce a new programming model for parallelism that significantly simplifies the job. Behind the scenes are sophisticated algorithms that dynamically distribute computations on multicore architectures. In addition, Microsoft® Visual Studio® 2010 development system includes debugging and analysis tools to support the new parallel programming model. You can use the patterns described in this book to improve your application's performance on multicore computers. Adopting the patterns in your code makes your application run faster today and also helps prepare for future hardware environments, which are expected to have an increasingly parallel computing architecture
    • CQRS Journey. This guidance is designed to help you get started with the Command & Query Responsibility Segregation and the Event Sourcing patterns. The guide is a journal that describes the experiences of a development team with no prior CQRS proficiency in building, deploying (to Windows Azure), and maintaining a sample real-world complex enterprise system to showcase various CQRS and ES concepts and techniques.
    • A Guide to Claims–based Identity and Access Control, 2nd Edition. This guide gives you enough information to evaluate claims-based identity as a possible option when you're planning a new application or making changes to an existing one. It is intended for any architect, developer, or information technology (IT) professional who designs, builds, or operates Web applications and services that require identity information about their users.
    • Testing for Continuous Delivery with Visual Studio 2012. This guide provides an end-to-end walkthrough of the testing scenarios supported by the Visual Studio 2012 infrastructure. It will help testers and developers use Team Foundation Server effectively as an application lifecycle management solution for testing and supporting products.
    • Microsoft Application Architecture Guide, 2nd Edition. This guide provides design-level guidance for the architecture and design of applications built on the .NET Framework.
    • Performance Testing Guidance for Web Applications. This guide shows you an end-to-end approach for implementing performance testing for your Web applications.

    Technical Articles

     

    Namoskar!!!

  • Wriju's BLOG

    Windows Phone Security : Encrypt and Decrypt

    • 0 Comments

    Often times you may want to secure the user data. However, there is one native API to support

    using System.Security.Cryptography;
    
    using System.Text;
    byte[] secretPassword; // to store it in a variable 
    
    private void btnEncrypt_Click(object sender, RoutedEventArgs e)
    
    {
    
        //Convert the text to byte[] 
    
        byte[] clearPassword = Encoding.UTF8.GetBytes(txtData.Text);
    
        //Encrypt
    
        secretPassword = ProtectedData.Protect(clearPassword, null);
    
        txtDecryptText.Text = "Encrypted...";
    
        txtData.Text = "";
    
    }
    
    private void btnDecrypt_Click(object sender, RoutedEventArgs e)
    
    {
    
        byte[] protectedPassowrd = secretPassword;
    
                
    
        //Decrypt the text
    
        byte[] unprotectPassword = ProtectedData.Unprotect(protectedPassowrd, null);
    
        txtDecryptText.Text = Encoding.UTF8.GetString(unprotectPassword, 0, unprotectPassword.Length);
    
        txtDecryptText.Text = "Decrypted...";
    
    }

    Namoskar!!!

  • Wriju's BLOG

    Windows Phone Storing string in Application Setting

    • 0 Comments

    For small key-value pair like storage we can use Application Setting and store the string. It is simple and easy to retrieve.

    // Storing the data in Application Settings
    private void btnSave_Click(object sender, RoutedEventArgs e)
    {
        IsolatedStorageSettings.ApplicationSettings["TheName"] = txtName.Text;
        IsolatedStorageSettings.ApplicationSettings.Save(); //Important to call to Save it
    }
    
    //Getting the data from Application Settings
    private void btnRead_Click(object sender, RoutedEventArgs e)
    {
        if(IsolatedStorageSettings.ApplicationSettings.Contains("TheName"))
        {
            txtRead.Text = (string)IsolatedStorageSettings.ApplicationSettings["TheName"];
    
            //To remove 
            IsolatedStorageSettings.ApplicationSettings.Remove("TheName");
        }            
    }
      

    Namoskar!!!

  • Wriju's BLOG

    Windows Store Apps and SQLite for x86, x64 and ARM

    • 2 Comments

    There are bunch of resources on how to use SQLite. The one which I came across and liked is http://jesseliberty.com/2013/03/14/windows-8-storing-data-with-sqlite/. If you follow step by step you will be able to reach the desired output. 

     

    What is more challenging is the final package when you create for Windows Store. SQLite DLL compiles per platform. So you need to compile separately for x86, x64 and ARM. I took help from Sid who created Bumpy and used Bing Map DLL. He too had the same issue.

    After we had a discussion we did the below thing.

    Created one project lets say Project_x64 and selected platform x64 by going to the project property

    image

     

    After that I created one more project under the same solution let’s assume Project_x32. Here is the trick. Added all the code file as LINK from previous project

    image

    This time the platform is x86. I did similar thing for ARM.

    Benefit: Whenever I change code I do it in one file and all the other project has the immediate affect. After that we I have to create the package I do it per platform like below

    image

    That’s it!!! Your app is ready for all the 3 platforms and you need to upload all the packages.

    Namoskar!!!

  • Wriju's BLOG

    Windows Azure WebSites–Best Presentation

    • 0 Comments

    This one is the best http://channel9.msdn.com/Events/windowsazure/Learn-2012TechEd-EU/WebSites

    image

    Namoskar!!!

  • Wriju's BLOG

    Windows Phone Development Absolute Beginners Series

    • 2 Comments

    It is amazing series in Channel 9 demonstrating the Windows Phone Development step by step. Watch it here http://channel9.msdn.com/Series/Windows-Phone-8-Development-for-Absolute-Beginners

    image

    Also the source code and instruction manual is available at

    Source Code: http://aka.ms/absbeginnerdevwp8
    PDF Version: http://aka.ms/absbeginnerdevwp8pdf

    Namoskar!!!

  • Wriju's BLOG

    Build your Windows Phone Application without writing Code

    • 0 Comments

    This is pretty cool. You do not need to be a developer to be able to publish an App to Windows Phone Store. More details visit http://apps.windowsstore.com/default.htm

    image

    Namoskar!!!

  • Wriju's BLOG

    Windows Phone Developer account at $19

    • 0 Comments

    This offer is valid till August 27. See for more http://dev.windowsphone.com/en-us/join

    image

    Namoskar!!!

  • Wriju's BLOG

    Learn ASP.NET 4.5 through Scott Hanselman

    • 0 Comments

    Scott is delivering ASP.NET 4.5, what could be more exciting!!!

  • Mod 01: What's New in ASP.NET 4.5
  • Mod 02: Building and Deploying Websites with ASP.NET MVC 4
  • Mod 03: Creating HTML5 Applications with jQuery
  • Mod 04: Building a Service Layer with ASP.NET Web API
  • Mod 05: Leveraging Your ASP.NET Development Skills to Build Office Apps
  • Mod 06: Building and Leveraging Social Services in ASP.NET
  • Mod 07: Building for the Mobile Web
  • Mod 08: Real-time Communication with SignalR
  • Mod 09: Taking Advantage of Windows Azure Services
  •  

    Namoskar!!!

  • Wriju's BLOG

    Windows Azure Storage 2.0 Changes

    • 0 Comments

    There are quite a few changes in Storage Library since SDK 1.8. Here are few resources on this

    Namoskar!!!

  • Wriju's BLOG

    Connecting and Managing MySQL of Windows Azure

    • 0 Comments

    Windows Azure provides the MySQL database but unfortunately we do not have any portal feature to work with the MySQL database associated with the Windows Azure WebSite. There is always a way,

    Let’s assume I have created a WebSite which has MySQL. For example I have created the website from gallery and selected the WordPress which comes with MySQL database. So I will have a MySQL database with it and I can read the connection string from the portal.

     

    image

     

    And the connection string would look like something

    Database=wrijuwpA55ISymtc;Data Source=us-cdbr-azure-northcentral-a.cleardb.com;User Id=UserName;Password=*******

    After I have it I can use any MySQL management tool to connect my database to it. I have tested it with MySQL Workbench.

    image

    Then you are ready to work with your MySQL Database and manage through this tool.

    image

    Namoskar!!!

  • Wriju's BLOG

    Windows Azure Tools Error “IISConfigurator.exe has stopped working”

    • 1 Comments

    I started getting this error after I had one Web Platform Installer download issue while updating my Windows Azure SDK 2.0. So I had uninstalled all the Windows Azure component from my control panel and was still getting “IISConfigurator.exe has stopped working”.

    I was trying a many things but some how when I changed the below and selected “IIS Management Console” it worked like a charm.

    image

    Namoskar!!!

  • Wriju's BLOG

    Windows Azure Storage Explorer in Visual Studio 2012

    • 0 Comments

    After installing the new Windows Azure SDK 2.0 I am happy to see this new Server Explorer component which lets me connect and manipulate Windows Azure Storage Component.

    image

    After I click there, I am able to associate the same management certificate which I have used to connect my Visual Studio 2012 for deployment.

    image

    After I select the account it would show the available storages. And I can choose from them.

    image

    Once it is pointed, I will be able to browse individual elements like Blob, Queue and Table.

    image

    I can view the Table and also can add values there.

    image

    image

    image

    This is really handy.

    Namoskar!!!

  • Wriju's BLOG

    Entity Framework CodeFirst Calling Find does Top 2

    • 0 Comments

    While using ADO.NET Entity Framework’s CodeFirst and we call Find() method against the PrimaryKey field we get one record. But surprisingly if we dig deeper we will be able to see that it is calling Top 2 which means actually getting two rows.

    Why is it so? Because just to track if there are more than one record in the field it will throw an error. Now the question is why is it possible to have duplicate record in the Primary Key value? Scenario could be, it may have the model created and later the database column was modified so it is no more primary/unique anymore.

    Below is the generated query for

    private static void SelectSingleEmployee(int id)
    {
        using (var ctx = new HRContext())
        {
            Console.WriteLine(ctx.Emps.Find(id).EmpName);
        }
    }
    exec sp_executesql N'SELECT TOP (2) 
    [Extent1].[EmpId] AS [EmpId], 
    [Extent1].[EmpName] AS [EmpName]
    FROM [dbo].[Emps] AS [Extent1]
    WHERE [Extent1].[EmpId] = @p0',N'@p0 int',@p0=1
    

    Namoskar!!!

  • Wriju's BLOG

    Scott Guthrie Discusses Windows Azure SDK 2.0

    • 0 Comments

    Scott Guthrie Discusses Windows Azure SDK 2.0 http://channel9.msdn.com/Shows/Cloud+Cover/Episode-106-Scott-Guthrie-Discusses-Windows-Azure-SDK-20

    Read this yet another amazing blog post http://weblogs.asp.net/scottgu/archive/2013/04/30/announcing-the-release-of-windows-azure-sdk-2-0-for-net.aspx

    Namoskar!!!

  • Wriju's BLOG

    GIDS 2013 Windows Phone 8 Developer Tips and Tricks Samples and Readings

    • 0 Comments

    Thank you. Thank you. Thank you!!!

    Samples Used for Demo

    Speech Synthesizer, Windows Azure and Chat, Windows Phone 8 Specific Demos

    At SkyDrive http://sdrv.ms/139QFaN (This is active till May 30, 2013)

    Windows Phone Toolkit and Sample http://aka.ms/wp8toolkit

    Azure Chat Service http://gids.cloudapp.net/ (available till May 30, 2013)

    Readings and Past recordings

    Complete end-to-end feature demo done by Jumpstart and few Build sessions available for download at http://aka.ms/wp8jumpstart

    Windows Phone 8 Training Kit http://aka.ms/wp8trainingkit

    What's new in Windows Phone http://aka.ms/wp8new

    Windows Phone 8 Code Samples http://aka.ms/wp8sample

    For any further query please contact us at Twitter @wriju_ghosh and @ujjwalk

    Namoskar!!!

  • Wriju's BLOG

    Windows Store Apps power of WinJS

    • 0 Comments

    Great Indian Developer Summit we showed the power of WinJS by taking pic and setting it in HTML page. Later we have used the image and set it as Profile picture. This was part of our Windows Store apps demo.

    The code is shared here

    (function () {
    
        //intialize Camera and then enable Webcam capability in manifest
    
        var cam = new Windows.Media.Capture.CameraCaptureUI();
    
        //Set the mode to still photo
    
        var mode = Windows.Media.Capture.CameraCaptureUIMode.photo;
    
        //Call the camera object Async
    
        cam.captureFileAsync(mode).then(function (capImage) {
    
            var img = capImage; 
    
            var imgTag = document.createElement("img"); //Create html img tag
    
            imgTag.src = URL.createObjectURL(img); //HTML5 feature to convert image stream to temporary URL
    
            document.getElementById("content").appendChild(imgTag); // Add the img to the HTML to render
    
            //Part 2: Setting the UserProfile image from JS
    
            Windows.System.UserProfile.UserInformation.setAccountPictureAsync(img).then();
    
        });
    
    })();

    Namoskar!!!

  • Wriju's BLOG

    Great Indian Developer Summit 2013 : Windows Store App Development Hands on Lab

    • 0 Comments

    I am very excited for the Hands on Lab Workshop tomorrow at Great Indian Developer Summit.

    Windows Store App Development Hands on Lab

    May 7 2013, 12.15 to 16.00 (Indian Standard Time) at Hall C.

    By Goutham Upadhyaya (@goupadhy) & Wriju Ghosh (twitter @wriju_ghosh), Partner Consultant, Microsoft Corp, India

    Find more at http://www.developermarch.com/developersummit/session.html?insert=gouthamtut1 

    Some prerequisite,

    System Requirement:

    • Supported operating systems: Windows 8
    • Also required: Microsoft Visual Studio 2012
    • Internet Connection (optional but good to have)

    Links for download http://msdn.microsoft.com/en-US/windows/apps/br229516

    image 

  • Wriju's BLOG

    GIDS 2013 Windows Phone 8 New Features and Tips & Tricks for Developers

    • 0 Comments

    I am happy to announce here that I will be delivering another Windows Phone 8 session in this GIDS 2013.

    Session Title: Windows Phone 8 New Features and Tips & Tricks for Developers

    Date and Time: May 9, 2013 14:50 to 15:50 (Indian Standard Time)

    Presenters:

    Ujjwal Kumar (Twitter @ujjwalk), Technical Evangelist, Microsoft Corp, India (blog http://blogs.msdn.com/b/ujjwalk)

    Wriju Ghosh (Twitter @wriju_ghosh), Lead Partner Consultant, Microsoft Corp, India. (blog http://blogs.msdn.com/b/wriju)

    What are we covering?

    As much as possible to give you all an idea of Windows Phone 8 development. Some tips to help you expedite the development process. Some store and test tips to help you make successful.

    All the codes and samples we will show will be posted to this blog, keep an eye. We have made it intentional that there is no slide, we have only one to show our above contact as we believe that you will be needing it for future help. Hope to have an interesting time.

    Details http://www.developermarch.com/developersummit/session.html?insert=ujjwalweb1

    Namoskar!!!

  • Wriju's BLOG

    GIDS Windows Store Apps Workshop

    • 0 Comments

    On May 7th I and Goutham will be delivering 3 hour workshop on Windows Store Apps both in XAML and in HTML at Great Indian Developer Summit. Keep watching this space for more information

    Abstract

    Developing Windows Store App in both XAML/C# and HTML/JS has been so easy. This is a series of eight hands-on lab modules that guide you through development of Contoso Cookbook, a realistic Windows Store app that incorporates many of the key new features available in Windows 8. You’ll learn to work with Windows 8 controls, view states, contracts, tiles and notifications, the Windows Store APIs, and other Windows 8 features. Choose the version of the lab series for the programming language you prefer: JavaScript and HTML, or C# and Extensible Application Markup Language (XAML).

    System Requirement

    ·         Supported operating systems: Windows 8

    ·         Also required: Microsoft Visual Studio 2012

    ·         Internet Connection (optional but good to have)

    Download Links

    Must to have

    Attendee must have the Windows 8 installed with Visual Studio 2012. Internet connection is desired.

  • Wriju's BLOG

    Windows Store App displaying Data in two more columns in ListView

    • 3 Comments

    Windows Store apps comes with some amazing data bound controls. The most favorite among them is ListView and GridView. The ListView shows data in vertical scrolling mode and GridView shows data in horizontal scrolling.

    My pal was building an app where she needs to display data in two columns while having the vertical scrolling enabled. This forced to have two data in two columns within ListView. We tried many things on it, even reached at an extent to have two image control in DataTemplate of ListView's ItemTemplate, but anyways it was obvious that approach was wrong. Because the inside DataTemplate if we click it considers all as one item. Then we found this trick of using WrapGrid this allows the column to be formatted. So we said there will be maximum of 2 columns and the size of the image needs to be defined inside it. The whole magic of displaying data is in MaximumRowsOrColumns

    <ListView x:Name="lstData" Grid.Row="1">
    
        <ListView.ItemTemplate>
    
            <DataTemplate>
    
                <Image Source="{Binding Path=ImagePath}" Stretch="Fill" HorizontalAlignment="Left" 
    
                   Margin="10,10,0,0" VerticalAlignment="Top"/>
    
            </DataTemplate>
    
        </ListView.ItemTemplate>
    
        <ListView.ItemsPanel>
    
            <ItemsPanelTemplate>
    
                <WrapGrid ItemHeight="100" ItemWidth="150" Orientation="Horizontal" MaximumRowsOrColumns="2"/>
    
            </ItemsPanelTemplate>
    
        </ListView.ItemsPanel>
    
    </ListView>

    Namoskar!!!

  • Wriju's BLOG

    Windows Phone Adding Rating Button in Apps

    • 0 Comments

    Often times as a developer we get motivated to see ratings being given to our Windows Phone apps. However, this is possible only when one downloads and installs it in the Phone from Marketplace/Store.

    I was not aware that the app list (not the desktop) has the context menu to rate, earlier to that I used to go to marketplace and rate if I really like the apps. This takes some efforts considering the fact that I am using Windows Phone unlike desktop. But we have context menu in the app list apart from the two “Uninstall” & “Pin this..”. Anyways, I would love to see AppBar button which lets me rate the apps from the app itself without navigating away. This is possible through the SDK API but you need to do what I like to call as “blind coding”. Let me explain the reason behind it. Unless your app is in the store the code you write to invoke the marketplace rating page will not work. So follow the people who has tried this and working well. We need to use the “Task” and the code looks as below

    MarketplaceReviewTask rev = new MarketplaceReviewTask();
    
    rev.Show();

    This would show up the rating page of Marketplace and hence you are.

    Namoskar!!!

  • Page 3 of 25 (613 items) 12345»