Setting UINavigationBar TintColor (Xamarin.iOS)

TL;DR

UIBarButtonItem.AppearanceWhenContainedIn(typeof(UINavigationBar))
        .SetTitleTextAttributes(attributes, UIControlState.Normal);

Continue Reading →

Building Apps for Xbox One with UWP

As you probably heard in the keynote at //build today – it is now possible to leverage the Universal Windows Platform (UWP) to build apps for Xbox One! Since the last //build in 2015 we have been using UWP to build single package apps that can be shared by phones and desktops that run Windows 10 – a huge step up from the Windows 8.1 “Universal” app development story.

Continue Reading →

Statically Defining Tabs on a Xamarin.Forms TabbedPage

In Xamarin.Forms screens are represented by Pages – a Page is a View Controller in iOS, an Activity in Android, and well.. a Page in Windows Phone.

Continue Reading →

Making Professional Mobile Screenshots

As a mobile app developer you may often find yourself needing to display screenshots of your work – perhaps for documentation, a slide deck, app store submission, or even a proposal or some other marketing asset. Getting a screenshot of your app is pretty trivial – you can capture it from the device itself or within the various emulators. However, the screenshot is going to look rather plain and typically sans device frame (e.g., just the screen itself, no skin). There are several web-based resources you can leverage to take those screenshots from plain to professional without even opening Photoshop:

Continue Reading →

Clearing Windows Phone Nav Back Stack in MvvmCross

There are often times when you might need to clear the navigation stack (aka back stack) in an app. One common example of this is when you allow a user to sign out – you don’t want them to be able to tap back and still have the ability to see the previous views. As you can image, this is done differently on each platform and therefore it can’t be done directly from a ViewModel – but there is a way to control it from the ViewModel.

Continue Reading →

Toggling Windows Phone App Bar Visibility

Quick note on changing the visibility of an app bar in a Windows Phone app.

Continue Reading →

Setting up the Moto G for Xamarin.Android Dev

The ability to build native apps for multiple platforms with Xamarin is pretty awesome. But developing apps for multiple platforms means you might “need” to get some new toys (not a bad thing if you’re like me :)). Personally I use a Windows Phone – I love the platform and have been on it since it came out. I have tons of WP devices lying around the house but not a single Android device (or iOS actually) – so I’ve simply been using Android emulators to do Xamarin.Android development. Unfortunately, the emulators are horribly slow… you even get a message warning you about it:

Continue Reading →

Tip: Use Windows Libraries for Quick Access to SharePoint Server Files

As a SharePoint developer or server admin you’ll find yourself in and out of the 14 hive all day long. You also make frequent trips to the various web app virtual directory folders. Both of these key locations are fairly deep and it can get rather annoying traversing down into them. So I started taking advantage of the Library feature that comes with Windows Server 2008 (and Windows 7, of course) to make it easier to access the files in these locations.

Continue Reading →

How to Predefine SPGridView FilterExpression

There are many situations where you might need to predefine or set a default FilterExpression for a SPGridView control. This would be a situation where you want to filter the rows within a SPGridView prior to the user selecting any filter parameters from the column headers. I find this particularly useful when initial grid filtering should be based on a selection made from a connected web part such as in a drilldown scenario.

Continue Reading →

Filtering in SPGridView JavaScript Error

I created a web part that uses the SPGridView control to display data from a List. I set AllowFiltering to true and when the web part rendered the gridview the column header appeared as a hyperlink with the dropdown menu arrow for applying a filter (just like the OoB grids do). But, when I clicked the arrow the filter menu failed to display – instead I received the following javascript error.

Continue Reading →

Determine if a Project is Published Using PSI

Believe it or not there is no property of the Project class in the PSI Project Web Service that tells you whether or not a project is published. One might expect something like IsPublished or PublishStatus or even IsDraft but unfortunately none of these exist.

Continue Reading →

Windows Phone 7 Developer Launch Live Event in DC this Week

Windows Phone 7 Banner

Continue Reading →

Reusable EditorPart - Using an EditorPart on Multiple Web Parts

Typically when writing a custom EditorPart you make it specific to a particular web part. What makes an EditorPart specific to a single web part is the reference back to the web part in the ApplyChanges and SyncChanges methods. You need this reference in order to access the properties on the web part that the EditorPart is collecting values for.

Continue Reading →

SharePoint 2010 - Adding Managed Accounts for Local Accounts

If you build a 2010 dev machine as a single server complete setup (instead of stand alone mode) and go the local account route for service and worker process accounts you will run into some issues when setting up Managed Accounts. Just like during configuration, SharePoint wants you to use local accounts only with stand alone mode.

Continue Reading →

Boot to VHD - Copying VHDs

If you have a VHD file that you boot to (Boot to VHD) and you want to copy it and boot to that copy as well you will need to use bcdedit as follows:

Continue Reading →

Darken Shading on PWA My Tasks with jQuery

The My Tasks page in PWA (Project Web Access) has a Timephased View that shows users their task assignments by week with planned and actual hours per day. To make it easier on the user to quickly find the tasks by day where they need to enter hours worked the control “grays out” the tasks on the days where 0 hours were planned leaving the days that need hours entered white. The problem is the grayed out tasks are not very dark, in fact you have to look at your screen from the side to notice the difference between the grayed out cells and the white cells. To make the grayed out cells more obvious for the user you can darken them using the following line of jQuery code:

Continue Reading →

Fail - Saab Distance-to-Empty Indicator

Looks like when Saab was developing the Distance-to-Empty logic for the SID (Saab Information Display) they didn’t think they needed to provide a conditional branch for DTE specifically equal to 1…

Continue Reading →

Overriding XmlElement to Make Adding XmlAttributes Easier

When programmatically building Xml documents adding elements and their attributes can become rather repetitive and tedious. Once you create the element object you have to create separate XmlAttribute instances for each attribute of that element tag and add them to the element’s attribute collection. In many cases you will have to add the same attribute or common set of attributes to different elements throughout the document. This can be a lot easier and intuitive by overriding the XmlElement class and making the element’s properties that would be XmlAttribute instances actual instance fields (public properties) of the XmlElement object itself. So, the client end of your overridden XmlElement object will simply set the element’s attribute values just as it would the InnerText property, instead of having create XmlAttribute instances. The implementation within the overridden XmlElement will handle the construction of the XmlAttribute instances as well as adding them to its attributes collection.

Continue Reading →

SharePoint 2010 - New Feature: Inline Editing List Items

In SharePoint 2010 you can now edit list items directly from within the list view itself using the new Inline Editing feature.

Continue Reading →

certsrv 404

If you get a 404 error in your browser when browsing to the certsrv virtual directory of the CA server (http://<caHostname>/certsrv) more than likely the virtual directory doesn’t exist. To be sure check IIS running on the CA server. From what I’ve read this can happen if Certificate Services are installed before IIS.

Continue Reading →

SharePoint Custom Role Provider – Important RoleManager Attribute Settings

Be sure to include the enabled attribute in your roleManager tag and set it to true. It is false by default which means if you don’t include the attribute your role provider isn’t going to work. Note: There is no enabled attribute for the membership tag.

Continue Reading →

T-SQL - Padding Integers with 0's

Here is a quick and easy tip for displaying integers padded with 0’s. This can be very useful when you need to display numbers that have inconsistant string lengths all as the same length. For example, you may have a list of employee numbers that can very in string length (number of digits) from 1 to 5 but need to be printed as 5 character strings padded with 0’s in the front (see the table below).

Continue Reading →